W3cubDocs

/LÖVE

love.filesystem.getLastModified

Gets the last modification time of a file.

Function

Synopsis

modtime, errormsg = love.filesystem.getLastModified( filename )

Arguments

string filename
The path and name to a file.

Returns

number modtime
The last modification time in seconds since the unix epoch or nil on failure.
string errormsg
The error message on failure.

Examples

Getting the time of a file and printing it as a date.

modtime, errormsg = love.filesystem.getLastModified("file.dat")
 
if modtime then
	print(os.date("%c", modtime)) -- "02/15/2011 12:32:11" (Depends on the system and locale)
end

See Also


© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.filesystem.getLastModified