Get age of a file/dir
Antoon Pardon
apardon at forel.vub.ac.be
Wed Aug 2 11:13:41 EDT 2006
On 2006-08-01, Carl J. Van Arsdall <cvanarsdall at mvista.com> wrote:
> I've been looking around the OS module and I haven't found anything
> useful yet. Does anyone know how to get the age of a file or directory
> in days? I'm using unix and don't seem to find anything that will help
> me. The only function that comes close so far is
>
> os.path.getctime(path)
>
> However this only gets creation time on Windows, on Unix it gets the the
> time of the last change. Any ideas?
On unix there is no way to get the age of a file or directory,
there is no information stored somewhere from which you can
calculate that.
--
Antoon Pardon
More information about the Python-list
mailing list