Esempio n. 1
0
 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
Esempio n. 2
0
 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
Esempio n. 3
0
    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
Esempio n. 4
0
    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