diff options
Diffstat (limited to 'docs/base.rst')
-rw-r--r-- | docs/base.rst | 8 |
1 files changed, 4 insertions, 4 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). |