Asterisk func stat

Synopsis:

Does a check on the specified file (NEW in Asterisk 1.4)

Description:

STAT(<flag>,<filename>)

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


Notes

  • *CLI> show function STAT

Return value

Returns the resulting string.

Example

exten => s,1,Set(foo=${STAT(s,/var/t3)})


See also

Synopsis:

Does a check on the specified file (NEW in Asterisk 1.4)

Description:

STAT(<flag>,<filename>)

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


Notes

  • *CLI> show function STAT

Return value

Returns the resulting string.

Example

exten => s,1,Set(foo=${STAT(s,/var/t3)})


See also

Created by: murf, Last modification: Fri 25 of Jan, 2013 (10:25 UTC) by RussP
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+