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
407775dd
Commit
407775dd
authored
Jan 02, 2010
by
willmcgugan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More doc tweaks
parent
f77f8fe5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
14 deletions
+21
-14
docs/conf.py
+2
-0
docs/filesystems.rst
+1
-1
fs/ftpfs.py
+17
-12
fs/memoryfs.py
+1
-1
No files found.
docs/conf.py
View file @
407775dd
...
...
@@ -192,3 +192,5 @@ latex_documents = [
# If false, no module index is generated.
#latex_use_modindex = True
autoclass_content
=
'both'
docs/filesystems.rst
View file @
407775dd
...
...
@@ -29,7 +29,7 @@ OS
An interface to the OS Filesystem. See :mod:`fs.osfs`
Secure FTP (Secure FTP)
----------------------
----------------------
-
A secure FTP filesystem. See :mod:`fs.sftpfs`
...
...
fs/ftpfs.py
View file @
407775dd
...
...
@@ -2,10 +2,12 @@
fs.ftpfs
========
FTPS is a filesystem for accessing an FTP server (uses ftplib in standard library)
FTP
F
S is a filesystem for accessing an FTP server (uses ftplib in standard library)
"""
__all__
=
[
'FTPFS'
]
import
fs
from
fs.base
import
*
from
fs.path
import
pathsplit
...
...
@@ -26,7 +28,6 @@ except ImportError:
import
time
import
sys
__all__
=
[
'FTPFS'
]
# -----------------------------------------------
# Taken from http://www.clapper.org/software/python/grizzled/
...
...
@@ -745,16 +746,20 @@ class FTPFS(FS):
port
=
21
,
dircache
=
True
,
max_buffer_size
=
128
*
1024
*
1024
):
"""
:param host:
:param user:
:param passwd:
:param timeout:
""" Connect to a FTP server.
:param host: Host to connect to
:param user: Username, or a blank string for anonymous
:param passwd: Password, if required
:param acct: Accounting information (few servers require this)
:param timeout: Timeout in seconds
:param port: Port to connection (default is 21)
:param dircache: If True then directory information will be cached,
which will speed up operations such as getinfo, isdi, isfile, but changes
to the ftp file structure will not be visible untill clear_dircache is
called
:param max_buffer_size: Number of bytes to hold before blocking write operations.
which will speed up operations such as getinfo, isdi, isfile, but
changes to the ftp file structure will not be visible until
`~fs.ftpfs.FTPFS.clear_dircache` is called
:param dircache: If True directory information will be cached for fast access
:param max_buffer_size: Number of bytes to hold before blocking write operations
"""
...
...
@@ -845,7 +850,7 @@ class FTPFS(FS):
"""
Clear cached directory information.
:path: Path of directory to clear cache for, or all directories if
:pa
ram pa
th: Path of directory to clear cache for, or all directories if
None (the default)
"""
...
...
fs/memoryfs.py
View file @
407775dd
...
...
@@ -180,7 +180,7 @@ class MemoryFS(FS):
return
self
.
dir_entry_factory
(
*
args
,
**
kwargs
)
def
__init__
(
self
,
file_factory
=
None
):
FS
.
__init__
(
self
,
thread_synchronize
=
_thread_syncronize_default
)
super
(
FS
,
self
)
.
__init__
(
thread_synchronize
=
_thread_syncronize_default
)
self
.
dir_entry_factory
=
DirEntry
self
.
file_factory
=
file_factory
or
MemoryFile
...
...
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