Summary: | ASTERISK-05293: [patch] [post 1.2] STAT() | ||
Reporter: | Tilghman Lesher (tilghman) | Labels: | |
Date Opened: | 2005-10-13 20:12:47 | Date Closed: | 2005-12-21 10:10:30.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Functions/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20051013__filestat.diff.txt | |
Description: | Return the value of a particular stat(2) call on a file. The most common application is to check if a file exists; however, the size, the mode, and modification times are also available. | ||
Comments: | By: kb1_kanobe2 (kb1_kanobe2) 2005-10-13 21:21:49 This looks like a clean and elegant replacement for many of the system() calls I'm using, however may I make one request; it would be a complete replacement if 'stat(e,<filename>)' supported wildcards as I also use the shell to determine the existance of subsequent layers IVR menu items (ie. using '?' as a suffix to the filename). Thanks! By: Tilghman Lesher (tilghman) 2005-10-13 22:04:32 I wouldn't do that in this function. If you want filename globbing, that should be done with a separate function, say, GLOB(<filename-pattern>). By: Olle Johansson (oej) 2005-11-22 11:11:23.000-0600 Would FILESTAT be a better name? By: Tilghman Lesher (tilghman) 2005-11-22 11:25:29.000-0600 No, function calls which simply encapsulate a library call are to be named for the library call they encapsulate. See the discussion surrounding the introduction of STRFTIME. |