예제 #1
0
 def pack(self, src, dest):
     files = DirectoryPacker()
     if self.include:
         files.pack(src, include=self.filters)
     elif self.exclude:
         files.pack(src, exclude=self.filters)
     open(dest, 'wb').write(str(files.generate()))
예제 #2
0
 def pack(self, src, dest):
     files = DirectoryPacker()
     if self.include:
         files.pack(src, include = self.filters)
     elif self.exclude:
         files.pack(src, exclude = self.filters)
     open(dest, 'wb').write(str(files.generate()))
예제 #3
0
 def unpack(self, src, dest, force):
     if not force and os.path.isdir(dest):
         return
     reader = ByteReader(open(src, 'rb'))
     files = DirectoryPacker(reader)
     files.unpack(dest)
예제 #4
0
 def unpack(self, src, dest, force):
     if not force and os.path.isdir(dest):
         return
     reader = ByteReader(open(src, 'rb'))
     files = DirectoryPacker(reader)
     files.unpack(dest)