summaryrefslogtreecommitdiff
path: root/fs/zipfs.py
diff options
context:
space:
mode:
authorwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2010-01-01 20:18:32 +0000
committerwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2010-01-01 20:18:32 +0000
commit671cf321fcc774c03d093fbae257e71b1df3d0ea (patch)
treee371fce423086808958d373d869b3fc66ef3e431 /fs/zipfs.py
parentbb120439de4f17426e17cd4d0782295c8192a869 (diff)
downloadpyfilesystem-671cf321fcc774c03d093fbae257e71b1df3d0ea.tar.gz
Documentation, fixes, A ReadOnlyFS wrapper and a plain old FTP FS class
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@309 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'fs/zipfs.py')
-rw-r--r--fs/zipfs.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/fs/zipfs.py b/fs/zipfs.py
index 4ec4126..7508b14 100644
--- a/fs/zipfs.py
+++ b/fs/zipfs.py
@@ -1,4 +1,10 @@
-#!/usr/bin/env python
+"""
+fs.zipfs
+========
+
+A FS object that represents the contents of a Zip file
+
+"""
from fs.base import *
@@ -52,12 +58,12 @@ class ZipFS(FS):
def __init__(self, zip_file, mode="r", compression="deflated", allowZip64=False, encoding="CP437", thread_synchronize=True):
"""Create a FS that maps on to a zip file.
- zip_file -- A (system) path, or a file-like object
- mode -- Mode to open zip file: 'r' for reading, 'w' for writing or 'a' for appending
- compression -- Can be 'deflated' (default) to compress data or 'stored' to just store date
- allowZip64 -- Set to True to use zip files greater than 2 MB, default is False
- encoding -- The encoding to use for unicode filenames
- thread_synchronize -- Set to True (default) to enable thread-safety
+ :param zip_file: A (system) path, or a file-like object
+ :param mode: Mode to open zip file: 'r' for reading, 'w' for writing or 'a' for appending
+ :param compression: Can be 'deflated' (default) to compress data or 'stored' to just store date
+ :param allowZip64: -- Set to True to use zip files greater than 2 MB, default is False
+ :param encoding: -- The encoding to use for unicode filenames
+ :param thread_synchronize: -- Set to True (default) to enable thread-safety
"""
FS.__init__(self, thread_synchronize=thread_synchronize)