summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2011-03-08 12:50:23 +0000
committerwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2011-03-08 12:50:23 +0000
commitc8941475a94c1f6ef67b44aeeb6f2f97359898d4 (patch)
tree25895f825f86b36be4747e107daf85abb9a936da /docs
parent4506b3a8c72ed98b4cd7df78cd8dee21c766b803 (diff)
downloadpyfilesystem-c8941475a94c1f6ef67b44aeeb6f2f97359898d4.tar.gz
Doc fixes
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@651 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'docs')
-rw-r--r--docs/base.rst8
-rw-r--r--docs/commands.rst6
-rw-r--r--docs/concepts.rst4
-rw-r--r--docs/expose.rst2
-rw-r--r--docs/ftpfs.rst2
-rw-r--r--docs/getting_started.rst10
-rw-r--r--docs/implementersguide.rst12
-rw-r--r--docs/introduction.rst1
8 files changed, 23 insertions, 22 deletions
diff --git a/docs/base.rst b/docs/base.rst
index 86398a0..835c61d 100644
--- a/docs/base.rst
+++ b/docs/base.rst
@@ -6,7 +6,7 @@ This module contains the basic FS interface and a number of other essential inte
fs.base.FS
----------
-All Filesystem objects inherit from this class,
+All Filesystem objects inherit from this class.
.. autoclass:: fs.base.FS
:members:
@@ -14,7 +14,7 @@ All Filesystem objects inherit from this class,
fs.base.SubFS
-------------
-A SubFS is an FS implementation that represents a directory on another Filesystem. When you use the `opendir` method it will return a SubFS instance. You should not need to instantiate a SubFS directly.
+A SubFS is an FS implementation that represents a directory on another Filesystem. When you use the :meth:`fs.base.FS.opendir` method it will return a SubFS instance. You should not need to instantiate a SubFS directly.
For example::
@@ -28,7 +28,7 @@ fs.base.NullFile
A NullFile is a file-like object with no functionality. It is used in situations where a file-like object is required but the caller doesn't have any data to read or write.
-The `safeopen` method returns an NullFile instance, which can reduce error-handling code.
+The :meth:`fs.base.FS.safeopen` method returns an NullFile instance, which can reduce error-handling code.
For example, the following code may be written to append some text to a log file::
@@ -44,5 +44,5 @@ This could be re-written using the `safeopen` method::
myfs.safeopen('log.txt', 'a').writeline('operation successful!')
-If the file doesn't exist then the call to writeline will be a null-operation (i.e. not do anything)
+If the file doesn't exist then the call to writeline will be a null-operation (i.e. not do anything).
diff --git a/docs/commands.rst b/docs/commands.rst
index 770bbc5..2b15f20 100644
--- a/docs/commands.rst
+++ b/docs/commands.rst
@@ -18,17 +18,19 @@ For example, the following uses a custom opener to list the contents of a direct
fsls --fs mypackage.mymodule.myfs.MyFSOpener myfs://127.0.0.1
+
Listing Supported Filesystems
-----------------------------
-All of the command line applications support the `--listopeners` switch, which lists all available installed openers::
+All of the command line applications support the ``--listopeners`` switch, which lists all available installed openers::
fsls --listopeners
+
fsls
----
-Lists the contents of a directory, similar to the `ls` command, e.g.::
+Lists the contents of a directory, similar to the ``ls`` command, e.g.::
fsls
fsls ../
diff --git a/docs/concepts.rst b/docs/concepts.rst
index 297ffa7..63bb1d5 100644
--- a/docs/concepts.rst
+++ b/docs/concepts.rst
@@ -71,7 +71,7 @@ For example::
u'/home/will/test.txt'
Not all FS implementation will map to a valid system path (e.g. the FTP FS object).
-If you call :meth:`~fs.base.FS.getsyspath` on such FS objects you will either get a :class:`~fs.errors.NoSysPathError` exception or a return value of ``None``, if you call ``getsyspath`` with `allow_none=True`.
+If you call :meth:`~fs.base.FS.getsyspath` on such FS objects you will either get a :class:`~fs.errors.NoSysPathError` exception or a return value of ``None``, if you call ``getsyspath`` with ``allow_none=True``.
Errors
------
@@ -89,4 +89,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 :class:`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 filesystem related exceptions.
diff --git a/docs/expose.rst b/docs/expose.rst
index 0e50274..31e3d86 100644
--- a/docs/expose.rst
+++ b/docs/expose.rst
@@ -1,7 +1,7 @@
Exposing FS objects
===================
-The ``fs.expose`` module offers a number of ways of making an FS implementation available over an internet connection, or to other processes on the system.
+The ``fs.expose`` module offers a number of ways of making an FS implementation available over an Internet connection, or to other processes on the system.
FUSE
diff --git a/docs/ftpfs.rst b/docs/ftpfs.rst
index fa7f98c..1164d78 100644
--- a/docs/ftpfs.rst
+++ b/docs/ftpfs.rst
@@ -1,2 +1,2 @@
-.. automodule:: fs.ftpfs
+.. autoclass:: fs.ftpfs.FTPFS
:members: \ No newline at end of file
diff --git a/docs/getting_started.rst b/docs/getting_started.rst
index 58cbfe3..83299fd 100644
--- a/docs/getting_started.rst
+++ b/docs/getting_started.rst
@@ -1,7 +1,7 @@
Getting Started
===============
-PyFilesystem is a Python-only module and can be installed with easy_install or by source. PyFilesystem is known to work on Linux, Mac and OSX.
+PyFilesystem is a Python-only module and can be installed with easy_install or from source. PyFilesystem is known to work on Linux, Mac and OSX.
Installing
----------
@@ -30,10 +30,10 @@ Prerequisites
-------------
PyFilesystem requires at least **Python 2.5**. There are a few other dependencies if you want to use some of the more advanced filesystem interfaces, but for basic use all that is needed is the Python standard library.
-
- * wxPython (required for fs.browsewin) http://www.wxpython.org/
- * Boto (required for fs.s3fs) http://code.google.com/p/boto/
- * Paramikio (required for fs.ftpfs) http://www.lag.net/paramiko/
+
+ * Boto (required for :mod:`fs.s3fs`) http://code.google.com/p/boto/
+ * Paramikio (required for :mod:`fs.ftpfs`) http://www.lag.net/paramiko/
+ * wxPython (required for :mod:`fs.browsewin`) http://www.wxpython.org/
Quick Examples
diff --git a/docs/implementersguide.rst b/docs/implementersguide.rst
index c7385fd..3dc7f6e 100644
--- a/docs/implementersguide.rst
+++ b/docs/implementersguide.rst
@@ -9,9 +9,9 @@ With a little care, you can write a wrapper for your filesystem that allows it t
To create a working PyFilesystem interface, derive a class from :py:class:`fs.base.FS` and implement the 9 :ref:`essential-methods`.
The base class uses these essential methods as a starting point for providing a lot of extra functionality,
but in some cases the default implementation may not be the most efficient.
-For example, most filesystems have some atomic way of moving a file without having to copy data,
-whereas the default implementation of :meth:`~fs.base.FS.move` method must copy all the bytes in the file.
-Although any of the :ref:`non-essential-methods` may be overriden, efficient versions of the following methods will have the greatest impact on performance:
+For example, most filesystems have an atomic way of moving a file from one location to another without having to copy data,
+whereas the default implementation of :meth:`~fs.base.FS.move` method must copy all the bytes in the source file to the destination file.
+Any of the :ref:`non-essential-methods` may be overriden, but efficient custom versions of the following methods will have the greatest impact on performance:
* :meth:`~fs.base.FS.copy` copy a file
* :meth:`~fs.base.FS.copydir` copy a directory
@@ -20,7 +20,7 @@ Although any of the :ref:`non-essential-methods` may be overriden, efficient ver
* :meth:`~fs.base.FS.move` move a file
* :meth:`~fs.base.FS.movedir` move a directory
-For network based filesystems (i.e. where the physical data is pulled from a network),
+For network based filesystems (i.e. where the physical data is pulled over a network),
there are a few methods which can reduce the number of round trips to the server,
if an efficient implementation is provided:
@@ -46,7 +46,7 @@ but this shouldn't prevent it from working with more generic code.
If specific exceptions need to be translated in to an equivalent FSError,
pass the original exception class to the FSError constructor with the 'details' keyword argument.
-For example, the following translates some ficticious exception in to an FS exception,
+For example, the following translates some fictitious exception in to an FSError exception,
and passes the original exception as an argument.::
try:
@@ -75,7 +75,7 @@ Implementations are also free to reserve a dotted namespace notation for themsel
If you do this, please avoid generic terms as they may conflict with existing or future implementations.
For example ``"bobs_ftpfs.author"``, rather than ``"ftpfs.author"``.
-If your meta values are static, i.e. they never change, then create a dictionary class attribute called ``_meta`` in your implementation that contains all the meta keys, values.
+If your meta values are static, i.e. they never change, then create a dictionary class attribute called ``_meta`` in your implementation that contains all the meta keys and values.
The default ``getmeta`` implementation will pull the meta values from this dictionary.
.. _essential-methods:
diff --git a/docs/introduction.rst b/docs/introduction.rst
index af2795b..7f1ddd4 100644
--- a/docs/introduction.rst
+++ b/docs/introduction.rst
@@ -28,4 +28,3 @@ Discussion Group
There is also a discussion group for PyFilesystem: http://groups.google.com/group/pyfilesystem-discussion
-