File in a directory
Fredrik Lundh
fredrik at pythonware.com
Fri Mar 23 11:18:40 EST 2001
Oliver Marugg wrote:
> Has anyone an idea how to solve that with the size or timestamp
> verification?
os.listdir(dir) => list of files in directory dir
os.path.getsize(file) => size of file
os.path.getmtime(file) => time of last modification (in seconds since epoch)
time.time() => current time (in seconds since epoch)
+ five to ten minutes of your time
-----------------------------
= solution
reference info here:
http://www.python.org/doc/current/lib/module-os.html
http://www.python.org/doc/current/lib/module-os.path.html
http://www.python.org/doc/current/lib/module-time.html
Cheers /F
More information about the Python-list
mailing list