Garry's Mod Wiki

Garry's Mod Wiki

  number file.Time( string path, string gamePath )

Description

Returns when the file or folder was last modified in Unix time.

Arguments

1 string path
The file or folder path.
2 string gamePath
The path to look for the files and directories in. See this list for a list of valid paths.

Returns

1 number
Seconds passed since Unix epoch, or 0 if the file is not found.

Example

Prints out the last modified date of file helloworld.txt

print( os.date("%d.%m.%Y", file.Time("helloworld.txt", "DATA") ) )
Output: 04.08.2012

Example

Prints out the last modified date of folder lua

print( os.date( "%d.%m.%Y", file.Time( "lua", "GAME" ) ) )
Output: 31.01.2016

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...