Skip to content

Commit d06a063

Browse files
author
willmcgugan@gmail.com
committed
Docs
1 parent 8de30fd commit d06a063

4 files changed

Lines changed: 32 additions & 12 deletions

File tree

docs/commands.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _commands:
2+
13
Command Line Applications
24
=========================
35

@@ -17,8 +19,8 @@ You can also 'point' the command line applications at an opener to add it to a l
1719
For example, the following uses a custom opener to list the contents of a directory served with the 'myfs' protocol::
1820

1921
fsls --fs mypackage.mymodule.myfs.MyFSOpener myfs://127.0.0.1
20-
21-
22+
23+
2224
Listing Supported Filesystems
2325
-----------------------------
2426

@@ -32,7 +34,7 @@ fsls
3234

3335
Lists the contents of a directory, similar to the ``ls`` command, e.g.::
3436

35-
fsls
37+
fsls
3638
fsls ../
3739
fsls ftp://example.org/pub
3840
fsls zip://photos.zip
@@ -55,23 +57,23 @@ Writes a file to stdout, e.g::
5557
fscat ~/.bashrc
5658
fscat http://www.willmcgugan.com
5759
fscat ftp://ftp.mozilla.org/pub/README
58-
60+
5961
fsinfo
6062
------
6163

6264
Displays information regarding a file / directory, e.g::
6365

6466
fsinfo C:\autoexec.bat
6567
fsinfo ftp://ftp.mozilla.org/pub/README
66-
68+
6769
fsmv
6870
----
6971

7072
Moves a file from one location to another, e.g::
7173

7274
fsmv foo bar
7375
fsmv *.jpg zip://photos.zip
74-
76+
7577
fsmkdir
7678
-------
7779

@@ -100,11 +102,11 @@ Removes (deletes) a file from a filesystem, e.g::
100102
fsserve
101103
-------
102104

103-
Serves the contents of a filesystem over a network with one of a number of methods; HTTP, RPC or SFTP, e.g::
105+
Serves the contents of a filesystem over a network with one of a number of methods; HTTP, RPC or SFTP, e.g::
104106

105107
fsserve
106108
fsserve --type rpc
107-
fsserve --type http zip://photos.zip
109+
fsserve --type http zip://photos.zip
108110

109111
fsmount
110112
-------

docs/getting_started.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PyFilesystem is a Python-only module and can be installed from source or with `p
66
Installing
77
----------
88

9-
To install with pip, use the following
9+
To install with pip, use the following::
1010

1111
pip install fs
1212

@@ -26,6 +26,16 @@ Whichever method you use, you should now have the `fs` module on your path (vers
2626
>>> fs.__version__
2727
'0.5.0'
2828

29+
You should also have the command line applications installed. If you enter the following in the command line, you should see a tree display of the current working directory::
30+
31+
fstree -l 2
32+
33+
Because the command line utilities use PyFilesystem, they also work with any of the supported filesystems. For example::
34+
35+
fstree ftp://ftp.mozilla.org -l 2
36+
37+
See :doc:`commands` for more information on the command line applications.
38+
2939
Prerequisites
3040
-------------
3141

docs/introduction.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ Even if you only want to work with the local filesystem, PyFilesystem simplifies
1010
About PyFilesystem
1111
------------------
1212

13-
PyFilesystem was initially created by Will McGugan (http://www.willmcgugan.com) and is now a joint effort with Ryan Kelly (http://www.rfk.id.au/).
13+
PyFilesystem was initially created by Will McGugan and is now a joint effort from the following contributors:
14+
15+
16+
- Will McGugan (http://www.willmcgugan.com)
17+
- Ryan Kelly (http://www.rfx.id.au)
18+
- Andrew Scheller
19+
- Ben Timby
20+
21+
And many others who have contributed bug reports and patches.
1422

1523

1624
Need Help?

docs/releasenotes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Release Notes
33

44
PyFilesystem has reached a point where the interface is relatively stable. The were some backwards incompatibilities introduced with version 0.5.0, due to Python 3 support.
55

6-
Changes from 0.5.0
6+
Changes from 0.4.0
77
------------------
88

99
Python 3.X support was added. The interface has remained much the same, but the ``open`` method now works like Python 3's builtin, which handles text encoding more elegantly. i.e. if you open a file in text mode, you get a stream that reads or writes unicode rather than binary strings.
@@ -14,7 +14,7 @@ The new signature to the ``open`` method (and ``safeopen``) is as follows::
1414

1515
In order to keep the same signature across both Python 2 and 3, PyFilesystems uses the ``io`` module from the standard library. Unfortunately this is only available from Python 2.6 onwards, so Python 2.5 support has been dropped. If you need Python 2.5 support, consider sticking to PyFilesystem 0.4.0.
1616

17-
By default the new ``open`` method now returns a unicode text stream, whereas 0.4.0 returned a binary file-like object. If you have code that runs on 0.4.0, you will probably want to either modify your code to work with unicode or explicitly open files in binary mode. The later is as simple as changing the mode from "r" to "rb" (or "w" to "wb"), but if you were working with unicode, the new text streams will likely save you a few lines of code.
17+
By default the new ``open`` method now returns a unicode text stream, whereas 0.4.0 returned a binary file-like object. If you have code that runs on 0.4.0, you will probably want to either modify your code to work with unicode or explicitly open files in binary mode. The latter is as simple as changing the mode from "r" to "rb" (or "w" to "wb"), but if you were working with unicode, the new text streams will likely save you a few lines of code.
1818

1919
The ``setcontents`` and ``getcontents`` methods have also grown a few parameters in order to work with text files. So you won't require an extra encode / decode step for text files.
2020

0 commit comments

Comments
 (0)