diff --git a/CHANGES.txt b/CHANGES.txt index 87763cd..6916b95 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,7 +5,7 @@ * FTPFS: access a plain old FTP server * S3FS: access remote files stored in Amazon S3 * RPCFS: access remote files using a simple XML-RPC protocol - * SFTPFS: access remote files on a SFTP server + * SFTPFS: access remote files on an SFTP server * WrapFS: filesystem that wraps an FS object and transparently modifies its contents (think encryption, compression, ...) * LazyFS: lazily instantiate an FS object the first time it is used diff --git a/docs/base.rst b/docs/base.rst index 08e4543..149ebbe 100644 --- a/docs/base.rst +++ b/docs/base.rst @@ -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 :meth:`~fs.base.FS.safeopen` method returns an NullFile instance, which can reduce error-handling code. +The :meth:`~fs.base.FS.safeopen` method returns a NullFile instance, which can reduce error-handling code. For example, the following code may be written to append some text to a log file:: diff --git a/docs/concepts.rst b/docs/concepts.rst index 52b80a4..6b5aaf7 100644 --- a/docs/concepts.rst +++ b/docs/concepts.rst @@ -8,7 +8,7 @@ Sandboxing FS objects are not permitted to work with any files / directories outside of the Filesystem they represent. If you attempt to open a file or directory outside the root of the FS (e.g. by using "../" in the path) you will get a ``ValueError``. -There is no concept of a current working directory in PyFilesystem, since it is a common source of bugs and not all filesystems even have such a notion. If you want to work with a sub-directory of a FS object, you can use the :meth:`~fs.base.FS.opendir` method which returns another FS object representing the sub-directory. +There is no concept of a current working directory in PyFilesystem, since it is a common source of bugs and not all filesystems even have such a notion. If you want to work with a sub-directory of an FS object, you can use the :meth:`~fs.base.FS.opendir` method which returns another FS object representing the sub-directory. For example, consider the following directory structure. The directory `foo` contains two sub-directories; `bar` and `baz`:: @@ -78,7 +78,7 @@ If you call :meth:`~fs.base.FS.getsyspath` on such FS objects you will either ge Errors ------ -PyFilesystem converts all exceptions to a common type, so that you need only write your exception handling code once. For example, if you try to open a file that doesn't exist, PyFilesystem will throw a :class:`~fs.errors.ResourceNotFoundError` regardless of whether the filesystem is local, on a ftp server or in a zip file:: +PyFilesystem converts all exceptions to a common type, so that you need only write your exception handling code once. For example, if you try to open a file that doesn't exist, PyFilesystem will throw a :class:`~fs.errors.ResourceNotFoundError` regardless of whether the filesystem is local, on an ftp server or in a zip file:: >>> from fs.osfs import OSFS >>> root_fs = OSFS('/') diff --git a/docs/interface.rst b/docs/interface.rst index b648506..96bca2c 100644 --- a/docs/interface.rst +++ b/docs/interface.rst @@ -34,7 +34,7 @@ The following methods are available in all PyFilesystem implementation: * :meth:`~fs.base.FS.move` Move a file to a new location * :meth:`~fs.base.FS.movedir` Recursively move a directory to a new location * :meth:`~fs.base.FS.open` Opens a file for read/writing - * :meth:`~fs.base.FS.opendir` Opens a directory and returns a FS object that represents it + * :meth:`~fs.base.FS.opendir` Opens a directory and returns an FS object that represents it * :meth:`~fs.base.FS.remove` Remove an existing file * :meth:`~fs.base.FS.removedir` Remove an existing directory * :meth:`~fs.base.FS.rename` Atomically rename a file or directory