summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2011-03-05 20:19:44 +0000
committerwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2011-03-05 20:19:44 +0000
commit238f0ae545a201bd7e809fcd54a12cd71d22bb3b (patch)
treeef0851c607085065e585d18fbfc34a349917fab9
parenteab2cc9c991f69d17f83d19ae395afcf54847ffe (diff)
downloadpyfilesystem-238f0ae545a201bd7e809fcd54a12cd71d22bb3b.tar.gz
Some doc changes
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@639 67cdc799-7952-0410-af00-57a81ceafa0f
-rw-r--r--docs/index.rst1
-rw-r--r--fs/base.py8
-rw-r--r--fs/zipfs.py16
3 files changed, 13 insertions, 12 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 0452d35..b415571 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -35,6 +35,7 @@ Code Documentation
browsewin.rst
errors.rst
expose/index.rst
+ filelike.rst
ftpfs.rst
memoryfs.rst
mountfs.rst
diff --git a/fs/base.py b/fs/base.py
index 3878b34..b02b5b1 100644
--- a/fs/base.py
+++ b/fs/base.py
@@ -498,9 +498,9 @@ class FS(object):
absolute=False,
dirs_only=False,
files_only=False):
- """Iterator yielding the files and directories under a given path.
+ """Generator yielding the files and directories under a given path.
- This method behaves identically to :py:meth:`fs.base.FS.listdir` but returns an iterator
+ This method behaves identically to :py:meth:`fs.base.FS.listdir` but returns an generator
instead of a list. Depending on the filesystem this may be more
efficient than calling :py:meth:`fs.base.FS.listdir` and iterating over the resulting list.
@@ -518,9 +518,9 @@ class FS(object):
absolute=False,
dirs_only=False,
files_only=False):
- """Iterator yielding paths and path info under a given path.
+ """Generator yielding paths and path info under a given path.
- This method behaves identically to :py:meth:`~fs.base.listdirinfo` but returns an iterator
+ This method behaves identically to :py:meth:`~fs.base.listdirinfo` but returns an generator
instead of a list. Depending on the filesystem this may be more
efficient than calling :py:meth:`~fs.base.listdirinfo` and iterating over the resulting
list.
diff --git a/fs/zipfs.py b/fs/zipfs.py
index b26746e..60b668a 100644
--- a/fs/zipfs.py
+++ b/fs/zipfs.py
@@ -83,14 +83,14 @@ class ZipFS(FS):
def __init__(self, zip_file, mode="r", compression="deflated", allow_zip_64=False, encoding="CP437", thread_synchronize=True):
"""Create a FS that maps on to a zip file.
- :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 allow_zip_64: -- Set to True to use zip files greater than 2 GB, default is False
- :param encoding: -- The encoding to use for unicode filenames
- :param thread_synchronize: -- Set to True (default) to enable thread-safety
- :raises ZipOpenError: Thrown when the zip file could not be opened
- :raises ZipNotFoundError: Thrown when the zip file does not exist (derived from ZipOpenError)
+ :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 allow_zip_64: set to True to use zip files greater than 2 GB, default is False
+ :param encoding: the encoding to use for unicode filenames
+ :param thread_synchronize: set to True (default) to enable thread-safety
+ :raises :py:class:`fs.errrors.ZipOpenError`: thrown when the zip file could not be opened
+ :raises :py:class:`fs.errors.ZipNotFoundError`: thrown when the zip file does not exist (derived from ZipOpenError)
"""
super(ZipFS, self).__init__(thread_synchronize=thread_synchronize)