Commit 407775dd by willmcgugan

More doc tweaks

parent f77f8fe5
...@@ -192,3 +192,5 @@ latex_documents = [ ...@@ -192,3 +192,5 @@ latex_documents = [
# If false, no module index is generated. # If false, no module index is generated.
#latex_use_modindex = True #latex_use_modindex = True
autoclass_content = 'both'
...@@ -29,7 +29,7 @@ OS ...@@ -29,7 +29,7 @@ OS
An interface to the OS Filesystem. See :mod:`fs.osfs` An interface to the OS Filesystem. See :mod:`fs.osfs`
Secure FTP (Secure FTP) Secure FTP (Secure FTP)
---------------------- -----------------------
A secure FTP filesystem. See :mod:`fs.sftpfs` A secure FTP filesystem. See :mod:`fs.sftpfs`
......
...@@ -2,10 +2,12 @@ ...@@ -2,10 +2,12 @@
fs.ftpfs fs.ftpfs
======== ========
FTPS is a filesystem for accessing an FTP server (uses ftplib in standard library) FTPFS is a filesystem for accessing an FTP server (uses ftplib in standard library)
""" """
__all__ = ['FTPFS']
import fs import fs
from fs.base import * from fs.base import *
from fs.path import pathsplit from fs.path import pathsplit
...@@ -26,7 +28,6 @@ except ImportError: ...@@ -26,7 +28,6 @@ except ImportError:
import time import time
import sys import sys
__all__ = ['FTPFS']
# ----------------------------------------------- # -----------------------------------------------
# Taken from http://www.clapper.org/software/python/grizzled/ # Taken from http://www.clapper.org/software/python/grizzled/
...@@ -745,16 +746,20 @@ class FTPFS(FS): ...@@ -745,16 +746,20 @@ class FTPFS(FS):
port=21, port=21,
dircache=True, dircache=True,
max_buffer_size=128*1024*1024): max_buffer_size=128*1024*1024):
""" """ Connect to a FTP server.
:param host:
:param user: :param host: Host to connect to
:param passwd: :param user: Username, or a blank string for anonymous
:param timeout: :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, :param dircache: If True then directory information will be cached,
which will speed up operations such as getinfo, isdi, isfile, but changes which will speed up operations such as getinfo, isdi, isfile, but
to the ftp file structure will not be visible untill clear_dircache is changes to the ftp file structure will not be visible until
called `~fs.ftpfs.FTPFS.clear_dircache` is called
:param max_buffer_size: Number of bytes to hold before blocking write operations. :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): ...@@ -845,7 +850,7 @@ class FTPFS(FS):
""" """
Clear cached directory information. Clear cached directory information.
:path: Path of directory to clear cache for, or all directories if :param path: Path of directory to clear cache for, or all directories if
None (the default) None (the default)
""" """
......
...@@ -180,7 +180,7 @@ class MemoryFS(FS): ...@@ -180,7 +180,7 @@ class MemoryFS(FS):
return self.dir_entry_factory(*args, **kwargs) return self.dir_entry_factory(*args, **kwargs)
def __init__(self, file_factory=None): 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.dir_entry_factory = DirEntry
self.file_factory = file_factory or MemoryFile self.file_factory = file_factory or MemoryFile
......
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