ModificationTime - Maple Help

FileTools

 ModificationTime
 obtain the modification time of a file

 Calling Sequence ModificationTime(file,opts)

Parameters

 file - filename or the file descriptor of an open file opts - (optional) one or more of the options described below

Options

 • output=integer or date
 Specifies whether the output should be an integer (representing the number of seconds after the epoch) or a Date object. The default is integer.

Description

 • The ModificationTime(file) command obtains the modification time of a file in seconds since the epoch.
 • If the file does not exist or an invalid file descriptor is passed, an exception is raised.

Examples

 > $\mathrm{FileTools}\left[\mathrm{Text}\right]\left[\mathrm{WriteFile}\right]\left("file","data"\right)$
 ${4}$ (1)
 > $\mathrm{FileTools}\left[\mathrm{ModificationTime}\right]\left("file"\right)$
 ${1037134620}$ (2)
 > $\mathrm{FileTools}\left[\mathrm{Remove}\right]\left("file"\right)$

Compatibility

 • The FileTools[ModificationTime] command was updated in Maple 2018.
 • The output option was introduced in Maple 2018.