Garry's Mod Wiki

file.Time

number file.Time( string path, string gamePath )

Description

Returns when the file or folder was lasted 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.

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

Page Links


Special Pages


Wikis

?

Render Time: 37ms

DB GetPage 3
Generate Html 10
SaveChanges (1) 9
Render Body 0
Render Sidebar 12