Commit 5e546ec4 by willmcgugan

Beginning a Zip Filesystem

parent 860467c3
......@@ -3,7 +3,6 @@
import os
import datetime
from fs import _iteratepath
from fs import *
try:
......
#!/usr/bin/env python
from fs import *
from zipfile import ZipFile
class ZipFS(FS):
def __init__(self, zip_file, mode="r", compression="deflated", allowZip64=False):
if compression == "deflated":
compression_type = zipfile.ZIP_DEFLATED
elif compression == "stored":
compression_type = zipfile.ZIP_STORES
else:
raise ValueError("Compression should be 'deflated' (default) or 'stored'")
self.zf = ZipFile(zip_file, mode, compression_type, )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment