Returns the day the given path was last modified. A os.error
occurs if the file does not exist or is inaccessible.
import os.path, time
print "last modified: %s" % time.ctime(os.path.getmtime(file))
print "created: %s" % time.ctime(os.path.getctime(file))
Returns an object that contains the following information about the file:
import os
fileinfo = os.stat(path)
print fileinfo.st_mtime
import os, time
(mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime) = os.stat(file)
print "last modified: %s" % time.ctime(time)
However, in Linux/unix systems, ctime() means the time when inode data
has changed, not the creation date.
717 GDB gets version error when attempting to debug with the Presense SDK (IDE)
1133 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
609 Who developed the "avformat-59.dll" that comes with FFmpeg?
691 Error in x, y, and format string must not be None
773 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2025 OneMinuteCode. All rights reserved.