Arbortext Command Language > Functions by Alphabetical Listing > file_mtime
  
file_mtime
file_mtime (path)
 
This function returns the last modification time of the file specified by path or 0 if the file does not exist. The time is given in seconds since the epoch (which is operating system-specific). This time can be converted into a string for display using the ctime function.
The path argument is either a file system path or an HTTP or HTTPS resource. For the latter, the function issues an HTTP HEAD request and uses the response header called Last-Modified to determine the modification time. On any error, or if the desired response header is missing, this returns 0.
Examples
eval ctime(file_mtime("memo.sgm"))
eval ctime(file_mtime("/Arbortext-path/memo.sgm"))
eval ctime(file_mtime('c:\memo.sgm'))
eval ctime(file_mtime("c:\\memo.sgm"))
* 
A backslash must be escaped if used with a double-quoted string since it introduces a C-style escape (for example, \n is a newline, \t is a tab, and so on). Alternatively, single quotes should be used since backslashes are not interpreted as escape characters.
Related Topics
ctime built-in function