def has_key(self, name, modified = None): fname = _fname(name) if modified is not None: modified = timestamp(modified) if not os.access(fname, os.R_OK): return False # the file exists, so os.stat should not raise an exception statinfo = os.stat(fname) if modified is not None and statinfo[ST_MTIME] != modified: return False return True
def has_key(name, modified=None): fname = _fname(name) if modified is not None: modified = timestamp(modified) if not os.access(fname, os.R_OK): return False # the file exists, so os.stat should not raise an exception statinfo = os.stat(fname) if modified is not None and statinfo[ST_MTIME] != modified: return False return True
def __init__(self, name, modified = None, user='******', group='root', \ mode=0755): if modified: self.modified = timestamp(modified) else: self.modified = None self.fname = _fname(name) self.fd = self.get_fd(name, user, group, mode) self.closed = False