Esempio n. 1
0
def restore(config, debug):
    """
    Restores all the ownerships and permissions on all files
    """
    filenames = collect(config)
    for item in filenames[0]:
        prepare(item, 'RESTORE', True, config, debug)
    for item in filenames[1]:
        prepare(item, 'RESTORE', False, config, debug)
Esempio n. 2
0
 def process_IN_MOVED_TO(self, event):
     prepare(event.pathname, "IN_MOVED_TO", event.dir, self.config, self.debug)
     if event.dir:
         # handle all nested files in event.pathname
         for root, dirnames, filenames in os.walk(event.pathname):
             for filename in filenames:
                 filenamewrite = os.path.join(root, filename)
                 prepare(filenamewrite, "IN_MOVED_TO", False, self.config, self.debug)
             for dirname in dirnames:
                 dirnamewrite = os.path.join(root, dirname)
                 prepare(dirnamewrite, "IN_MOVED_TO", True, self.config, self.debug)
Esempio n. 3
0
 def process_IN_CREATE(self, event):
     prepare(event.pathname, "IN_CREATE", event.dir, self.config, self.debug)
Esempio n. 4
0
 def process_IN_MODIFY(self, event):
     prepare(event.pathname, "IN_MODIFY", event.dir, self.config, self.debug)
Esempio n. 5
0
 def process_IN_ATTRIB(self, event):
     prepare(event.pathname, "IN_ATTRIB", event.dir, self.config, self.debug)