Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pyfs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pyfs
Commits
71df3fdc
Commit
71df3fdc
authored
Mar 05, 2011
by
willmcgugan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs on the command line apps
parent
079fa398
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
117 additions
and
5 deletions
+117
-5
docs/commands.rst
+115
-3
docs/getting_started.rst
+2
-2
No files found.
docs/commands.rst
View file @
71df3fdc
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
docs/getting_started.rst
View file @
71df3fdc
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 know
n
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
-------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment