Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pyfs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pyfs
Commits
8cc2be2e
Commit
8cc2be2e
authored
Mar 05, 2011
by
willmcgugan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some doc changes
parent
71df3fdc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
docs/index.rst
+1
-0
fs/base.py
+4
-4
fs/zipfs.py
+8
-8
No files found.
docs/index.rst
View file @
8cc2be2e
...
@@ -35,6 +35,7 @@ Code Documentation
...
@@ -35,6 +35,7 @@ Code Documentation
browsewin.rst
browsewin.rst
errors.rst
errors.rst
expose/index.rst
expose/index.rst
filelike.rst
ftpfs.rst
ftpfs.rst
memoryfs.rst
memoryfs.rst
mountfs.rst
mountfs.rst
...
...
fs/base.py
View file @
8cc2be2e
...
@@ -498,9 +498,9 @@ class FS(object):
...
@@ -498,9 +498,9 @@ class FS(object):
absolute
=
False
,
absolute
=
False
,
dirs_only
=
False
,
dirs_only
=
False
,
files_only
=
False
):
files_only
=
False
):
"""
It
erator yielding the files and directories under a given path.
"""
Gen
erator yielding the files and directories under a given path.
This method behaves identically to :py:meth:`fs.base.FS.listdir` but returns an
it
erator
This method behaves identically to :py:meth:`fs.base.FS.listdir` but returns an
gen
erator
instead of a list. Depending on the filesystem this may be more
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.
efficient than calling :py:meth:`fs.base.FS.listdir` and iterating over the resulting list.
...
@@ -518,9 +518,9 @@ class FS(object):
...
@@ -518,9 +518,9 @@ class FS(object):
absolute
=
False
,
absolute
=
False
,
dirs_only
=
False
,
dirs_only
=
False
,
files_only
=
False
):
files_only
=
False
):
"""
It
erator yielding paths and path info under a given path.
"""
Gen
erator yielding paths and path info under a given path.
This method behaves identically to :py:meth:`~fs.base.listdirinfo` but returns an
it
erator
This method behaves identically to :py:meth:`~fs.base.listdirinfo` but returns an
gen
erator
instead of a list. Depending on the filesystem this may be more
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
efficient than calling :py:meth:`~fs.base.listdirinfo` and iterating over the resulting
list.
list.
...
...
fs/zipfs.py
View file @
8cc2be2e
...
@@ -83,14 +83,14 @@ class ZipFS(FS):
...
@@ -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
):
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.
"""Create a FS that maps on to a zip file.
:param zip_file:
A
(system) path, or a file-like object
:param zip_file:
a
(system) path, or a file-like object
:param mode:
M
ode to open zip file: 'r' for reading, 'w' for writing or 'a' for appending
:param mode:
m
ode to open zip file: 'r' for reading, 'w' for writing or 'a' for appending
:param compression:
C
an be 'deflated' (default) to compress data or 'stored' to just store date
:param compression:
c
an be 'deflated' (default) to compress data or 'stored' to just store date
:param allow_zip_64:
-- S
et to True to use zip files greater than 2 GB, default is False
:param allow_zip_64:
s
et to True to use zip files greater than 2 GB, default is False
:param encoding:
-- T
he encoding to use for unicode filenames
:param encoding:
t
he encoding to use for unicode filenames
:param thread_synchronize:
-- S
et to True (default) to enable thread-safety
:param thread_synchronize:
s
et to True (default) to enable thread-safety
:raises
ZipOpenError: T
hrown when the zip file could not be opened
:raises
:py:class:`fs.errrors.ZipOpenError`: t
hrown when the zip file could not be opened
:raises
ZipNotFoundError: T
hrown when the zip file does not exist (derived from ZipOpenError)
:raises
:py:class:`fs.errors.ZipNotFoundError`: t
hrown when the zip file does not exist (derived from ZipOpenError)
"""
"""
super
(
ZipFS
,
self
)
.
__init__
(
thread_synchronize
=
thread_synchronize
)
super
(
ZipFS
,
self
)
.
__init__
(
thread_synchronize
=
thread_synchronize
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment