filetime(
PATH
)

The filetime( function returns the modification time of a file.


Parameters

This function has one parameter:

path – is a path to the file, including the file name (see Files and Folders for more information about file paths).


Description

This function returns the modification time of the specified file (in seconds since midnight).

This example checks to see if the news.txt file is more than 15 minutes old, and if so, deletes it.

if filetime("~/Documents/news.txt") < now() - (15 * 60)
    fileerase "~/Documents/news.txt"
endif

Tip: If you want to display the time, use the timepattern( function.

Legacy Syntax (Separate Folder and File Parameters)

In older versions of Panorama (6.0 and earlier) the filetime( function had two parameters, folderid and filename. To maintain compatibility with older databases, two parameters will still work, as shown in this example:

filetime(folder("~/Documentation"),"news.txt")

For new databases you’ll probably find it easier to use the single parameter mode.


See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but now may have either one parameter (path) or two (folder, path).