summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2010-06-18 18:46:30 +0000
committerwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2010-06-18 18:46:30 +0000
commit4ded92bcaea1500a89678272769837f084b3200d (patch)
tree945fe7c2e58450ad25bcd51703d9a20e0a5c8ff8 /docs
parentb4c092f0d2f68848bf5dc629030034792e35e390 (diff)
downloadpyfilesystem-git-4ded92bcaea1500a89678272769837f084b3200d.tar.gz
Lots of new docs
Diffstat (limited to 'docs')
-rw-r--r--docs/concepts.rst2
-rw-r--r--docs/filesystems.rst6
-rw-r--r--docs/index.rst3
-rw-r--r--docs/interface.rst11
-rw-r--r--docs/introduction.rst2
-rw-r--r--docs/mountfs.rst1
-rw-r--r--docs/wrapfs.rst2
7 files changed, 18 insertions, 9 deletions
diff --git a/docs/concepts.rst b/docs/concepts.rst
index a140b5a..7eee853 100644
--- a/docs/concepts.rst
+++ b/docs/concepts.rst
@@ -85,4 +85,4 @@ PyFilesystem converts all exceptions to a common type, so that you need only wri
return open(self.getsyspath(path), mode, kwargs.get("buffering", -1))
fs.errors.ResourceNotFoundError: Resource not found: doesnotexist.txt
-All PyFilesystem exceptions are derived from ``fs.errors.FSError``, so you may use that if you want to catch all possible exceptions.
+All PyFilesystem exceptions are derived from :class:`fs.errors.FSError`, so you may use that if you want to catch all possible exceptions.
diff --git a/docs/filesystems.rst b/docs/filesystems.rst
index da01faa..10d2526 100644
--- a/docs/filesystems.rst
+++ b/docs/filesystems.rst
@@ -28,6 +28,12 @@ OS
--
An interface to the OS Filesystem. See :mod:`fs.osfs`
+
+RPCFS (Remote Procedure Call)
+-----------------------------
+An interface to a file-system serverd over XML RPC, See :mod:`fs.rpcfs` and :mod:`fs.expose.xmlrpc`
+
+
Secure FTP (Secure FTP)
-----------------------
A secure FTP filesystem. See :mod:`fs.sftpfs`
diff --git a/docs/index.rst b/docs/index.rst
index 1b9e095..6969ee4 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -37,7 +37,8 @@ Code Documentation
multifs.rst
osfs.rst
path.rst
- rpcfsfs.rst
+ remote.rst
+ rpcfs.rst
s3fs.rst
sftpfs.rst
tempfs.rst
diff --git a/docs/interface.rst b/docs/interface.rst
index 343a56f..d8ce157 100644
--- a/docs/interface.rst
+++ b/docs/interface.rst
@@ -1,8 +1,13 @@
Filesystem Interface
====================
-It requires a relatively small number of methods to implement a working Filesystem object.
+It requires a relatively small number of methods to implement a working FS object.
+If you are looking to implement a working FS object, derive a class from fs.base.FS and implement the essential methods (below). Be sure to convert all exceptions to instances of :class:`fs.errors.FSError`.
+
+It may also be worthwhile implementing some of the non-essential methods, as the default implementations may not be optimal. For example, the method :meth:`fs.base.FS.move` is implemeneted as a file copy followed by a delete, but may filesystems can move a file without copying data.
+
+If the filesystem you are implementing maps path to the native filesystem, be sure to implement `getsyspath`. Doing so will improve performance, especialy when copying / moving files between FS objects.
Essential Methods
-----------------
@@ -40,7 +45,7 @@ The following methods have default implementations in fs.base.FS and aren't requ
Utility Methods
---------------
-The following members have implementations in fs.base.FS but will probably never need a non-default implementation, although there is nothing to prevent a derived class from implementing these:
+The following members have implementations in fs.base.FS but will probably never require a non-default implementation, although there is nothing to prevent a derived class from implementing these:
* :meth:`~fs.base.FS.createfile` Create a file with data
* :meth:`~fs.base.FS.getcontents` Returns the contents of a file as a string
@@ -50,4 +55,4 @@ The following members have implementations in fs.base.FS but will probably never
* :meth:`~fs.base.FS.walk` Like `listdir` but descends in to sub-directories
* :meth:`~fs.base.FS.walkfiles` Returns an iterable of file paths in a directory, and its sub-directories
* :meth:`~fs.base.FS.walkdirs` Returns an iterable of paths to sub-directories
- \ No newline at end of file
+
diff --git a/docs/introduction.rst b/docs/introduction.rst
index 3f03765..bb92746 100644
--- a/docs/introduction.rst
+++ b/docs/introduction.rst
@@ -5,5 +5,5 @@ PyFilesystem is a Python module that provides a common interface to any filesyst
Think of PyFilesystem (FS) objects as the next logical step to Python's `file` objects. Just as file-like objects abstract a single file, FS objects abstract the whole filesystem by providing a common interface to operations such as reading directories, getting file information, opening/copying/deleting files etc.
-Even if you only want to work with the local filesystem, FS simplifies a number of common operations and reduces the chance of error. A typical problem when working with the filesystem is writing a function that changes the current working directory, but doesn't set it back. This can be a tricky bug to identify since the problem will only manifest itself when you next try to work with the filesystem. PyFilesytem doesn't have this problem, because it doesn't modify the current working directory. It is also possible to restrict any file operations to a specific directory, which elliminates the possibility of accidently overwriting / deleting files outside of the specified directory.
+Even if you only want to work with the local filesystem, PyFilesystem simplifies a number of common operations and reduces the chance of error.
diff --git a/docs/mountfs.rst b/docs/mountfs.rst
index fc62729..a0c223f 100644
--- a/docs/mountfs.rst
+++ b/docs/mountfs.rst
@@ -1,6 +1,5 @@
.. automodule:: fs.mountfs
- .. automethod:: fs.mountfs.MountFS.mount(self, path, fs)
.. automethod:: fs.mountfs.MountFS.mountdir(self, path, fs)
.. automethod:: fs.mountfs.MountFS.mountfile(self, path, open_callable=None, info_callable=None)
.. automethod:: fs.mountfs.MountFS.unmount(path) \ No newline at end of file
diff --git a/docs/wrapfs.rst b/docs/wrapfs.rst
deleted file mode 100644
index e52fa3e..0000000
--- a/docs/wrapfs.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-.. automodule:: fs.wrapfs
- :members: \ No newline at end of file