ID EN
OS Path

getmtime

Python 3.11

Return the time of last modification of path. The return value is a floating point number giving the number of seconds since the epoch (see the time module). Raise OSError if the file does not exist or is inaccessible.

Syntax

PYTHON
os.path.getmtime(path)

See Also

time OSError path-like object