test icin.. hemen kizmayin :)

bir de henuz symlink problemimiz var, cozulecek..
This commit is contained in:
A. Murat Eren
2005-06-22 12:55:42 +00:00
parent 015de364d6
commit 42f38767ee
+8 -2
View File
@@ -61,8 +61,14 @@ class ArchiveZip(ArchiveBase):
def close(self):
self.zip.close()
def add_file(self, zipPath, filePath):
self.zip.write(filePath, filePath, zipfile.ZIP_DEFLATED)
def add_file(self, workDir, file):
realPath = workDir + '/' + file
if os.path.isdir(realPath):
self.zip.writestr(file + '/', '')
for f in os.listdir(realPath):
self.add_file(workDir, file + '/' + f)
else:
self.zip.write(realPath, file, zipfile.ZIP_DEFLATED)
def unpack_file_cond(self, pred, targetDir, archiveRoot=''):
""" unpack file according to predicate function filename -> bool"""