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()))
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()))
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)