##### Views

- Page
- Discussion
- View source
- History

# love.filesystem.getLastModified

Available since LÖVE 0.7.1
This function is not supported in earlier versions.

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

- love.filesystem

## Other Languages

Dansk – Deutsch – English – Español – Français – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Polski – Português – Română – Slovenský – Suomi – Svenska – Türkçe – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – ไทย – 日本語 – 正體中文 – 简体中文 – Tiếng Việt – 한국어
More info

Retrieved from "https://www.love2d.org/wiki/love.filesystem.getLastModified"
Categories: Templates | Functions

##### Personal tools

- Log in

##### Search

##### Toolbox

- What links here
- Related changes
- Special pages
- Printable version
- Permanent link
- Browse properties