STAT(flag,filename)
(beginning Asterisk 1.4)
Returns status information about a file (compare the shell
commands test and stat). The
refers to an inode, so
it can be a directory or a specific file. The
filename can be one of the
following:flag
d
filename is
a directory.e
f
filename is a
regular file (as opposed to a special file, such as a block
special file, character special file, symbolic link, named pipe,
or socket).m
filename
(octal), i.e. the permissions:
e.g. 0754.s
A
C
M
; See when /etc/crontab was last changed:
exten => 123,1,Set(foo=${STAT(M,/etc/crontab)})
|
|
|
Internal help for this application in Asterisk 1.4: -= Info about function 'STAT' =- [Syntax] STAT(<flag>,<filename>) [Synopsis] Does a check on the specified file [Description] flag may be one of the following: d - Checks if the file is a directory e - Checks if the file exists f - Checks if the file is a regular file m - Returns the file mode (in octal) s - Returns the size (in bytes) of the file A - Returns the epoch at which the file was last accessed C - Returns the epoch at which the inode was last changed M - Returns the epoch at which the file was last modified diff output to internal help in Asterisk 1.2: -- not available in Version 1.2 -- |