summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2011-03-05 20:13:27 +0000
committerwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2011-03-05 20:13:27 +0000
commiteab2cc9c991f69d17f83d19ae395afcf54847ffe (patch)
tree74adaf7ecbd6ffbc08c8611fdb13f439079b4c2c /docs
parent158277d139dd8b7e019f4b779ab0041a2442aa37 (diff)
downloadpyfilesystem-eab2cc9c991f69d17f83d19ae395afcf54847ffe.tar.gz
Docs on the command line apps
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@638 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'docs')
-rw-r--r--docs/commands.rst116
-rw-r--r--docs/getting_started.rst4
2 files changed, 116 insertions, 4 deletions
diff --git a/docs/commands.rst b/docs/commands.rst
index f7f9eb9..770bbc5 100644
--- a/docs/commands.rst
+++ b/docs/commands.rst
@@ -1,2 +1,114 @@
-fs.commands
-=========== \ No newline at end of file
+Command Line Applications
+=========================
+
+PyFilesystem adds a number of applications that expose some of the PyFilesystem functionality to the command line.
+These commands use the opener syntax, as described in :doc:`opening`, to refer to filesystems.
+
+Most of these applications shadow existing shell commands and work in similar ways.
+
+All of the command line application support the `-h` (or `--help`) switch which will display a full list of options.
+
+
+Custom Filesystem Openers
+-------------------------
+
+When opening filesystems, the command line applications will use the default openers.
+You can also 'point' the command line applications at an opener to add it to a list of available openers.
+For example, the following uses a custom opener to list the contents of a directory served with the 'myfs' protocol::
+
+ 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::
+
+ fsls --listopeners
+
+fsls
+----
+
+Lists the contents of a directory, similar to the `ls` command, e.g.::
+
+ fsls
+ fsls ../
+ fsls ftp://example.org/pub
+ fsls zip://photos.zip
+
+fstree
+------
+
+Displays an ASCII tree of a directory. e.g::
+
+ fstree
+ fstree -g
+ fstree rpc://192.168.1.64/foo/bar -l3
+ fstree zip://photos.zip
+
+fscat
+-----
+
+Writes a file to stdout, e.g::
+
+ fscat ~/.bashrc
+ fscat http://www.willmcgugan.com
+ fscat ftp://ftp.mozilla.org/pub/README
+
+fsinfo
+------
+
+Displays information regarding a file / directory, e.g::
+
+ fsinfo C:\autoexec.bat
+ fsinfo ftp://ftp.mozilla.org/pub/README
+
+fsmv
+----
+
+Moves a file from one location to another, e.g::
+
+ fsmv foo bar
+ fsmv *.jpg zip://photos.zip
+
+fsmkdir
+-------
+
+Makes a directory on a filesystem, e.g::
+
+ fsmkdir foo
+ fsmkdir ftp://ftp.mozilla.org/foo
+ fsmkdir rpc://127.0.0.1/foo
+
+fscp
+----
+
+Copies a file from one location to another, e.g::
+
+ fscp foo bar
+ fscp ftp://ftp.mozilla.org/pub/README readme.txt
+
+fsrm
+----
+
+Removes (deletes) a file from a filesystem, e.g::
+
+ fsrm foo
+ fsrm -r mydir
+
+fsserve
+-------
+
+Serves the contents of a filesystem over a network with one of a number of methods; HTTP, RPC or SFTP, e.g::
+
+ fsserve
+ fsserve --type rpc
+ fsserve --type http zip://photos.zip
+
+fsmount
+-------
+
+Mounts a filesystem with FUSE (on Linux) and Dokan (on Windows), e.g::
+
+ fsmount mem:// ram
+ fsserve mem:// M
+ fsserve ftp://ftp.mozilla.org/pub ftpgateway \ No newline at end of file
diff --git a/docs/getting_started.rst b/docs/getting_started.rst
index a39a47f..58cbfe3 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 know to work on Linux, Mac and OSX.
+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.
Installing
----------
@@ -24,7 +24,7 @@ You should now have the `fs` module on your path:
>>> import fs
>>> fs.__version__
- '0.3.0'
+ '0.4.0'
Prerequisites
-------------