Ignore:
Timestamp:
07/12/10 22:39:50 (23 months ago)
Author:
Luper Rouch <luper.rouch@…>
Children:
c185bb3f8037449c1448deba90c5e3cff30e1cb2
Parents:
eeda349e03ba693572ec1906566cdaea952fe906
git-committer:
Luper Rouch <luper.rouch@…> (07/12/10 22:39:50)
Message:

pyflu: added a function to retrieve files modification time

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyflu/pyflu/path.py

    r6408560 rd784e4c  
    22 
    33import os 
     4import sys 
    45from os.path import commonprefix, abspath, join, splitext 
    56 
     
    3334 
    3435 
     36def file_mtime(path): 
     37    """ 
     38    Get the (correct) modification time of the file at *path*. 
     39    """ 
     40    stat = os.stat(path) 
     41    mtime = stat.st_mtime 
     42    if sys.platform == "win32": 
     43        mtime -= stat.st_ctime 
     44    return mtime 
    3545 
Note: See TracChangeset for help on using the changeset viewer.