summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2009-11-26 22:40:00 +0000
committerwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2009-11-26 22:40:00 +0000
commitfee7b799c5b6612e1ef09b3c4242b34e06b659dc (patch)
tree824198b8e6c79c51ed46851d875405da18a23d58 /docs
parent2ca166aaa0f9375869ba41c099c87f917bca6bcb (diff)
downloadpyfilesystem-fee7b799c5b6612e1ef09b3c4242b34e06b659dc.tar.gz
Made a start to the docs
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@286 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'docs')
-rw-r--r--docs/getting_started.rst44
-rw-r--r--docs/introduction.rst8
2 files changed, 52 insertions, 0 deletions
diff --git a/docs/getting_started.rst b/docs/getting_started.rst
index 2d48f65..c015b1b 100644
--- a/docs/getting_started.rst
+++ b/docs/getting_started.rst
@@ -1,4 +1,48 @@
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.
+Installing
+----------
+
+The easiest way to install PyFilesystem is with `easy_install <http://peak.telecommunity.com/DevCenter/EasyInstall>`_::
+
+ easy_install fs
+
+This will install the latest stable release. If you would prefer to install the cutting edge release then you can get the latest copy of the source via SVN::
+
+ svn checkout http://pyfilesystem.googlecode.com/svn/trunk/ pyfilesystem-read-only
+ cd pyfilesystem-read-only
+ python setup.py install
+
+You should now have the _fs_ module on your path:
+
+ >>> import fs
+ >>> fs.__version__
+ '0.2.0a9'
+
+Prerequisites
+-------------
+
+PyFilesystem requires at least **Python 2.4**. There are a few other dependancies if you want to use some of the more advanced filesystem interfaces, but for basic use all that is needed is the Python standard library.
+
+ * wxPython (required for fs.browsewin) http://www.wxpython.org/
+ * Boto (required for fs.s3fs) http://code.google.com/p/boto/
+ * Paramikio (required for fs.ftpfs) http://www.lag.net/paramiko/
+
+
+Quick Examples
+--------------
+
+Before you dive in to the API documentation, here are a few interesting things you can do with pyFilesystem.
+
+The following will list all the files in your home directory::
+
+ >>> from fs.osfs import OSFS
+ >>> home_fs = OSFS('~/') # 'c:\Users\<login name>' on Windows
+ >>> home_fs.listdir()
+
+This will display the total number of bytes store in your home directory::
+
+ >>> sum(home_fs.getsize(f) for f in home_fs.listdir())
diff --git a/docs/introduction.rst b/docs/introduction.rst
new file mode 100644
index 0000000..706eb04
--- /dev/null
+++ b/docs/introduction.rst
@@ -0,0 +1,8 @@
+Introduction
+============
+
+PyFilesystem is a Python module that provides a common interface to disparate filesystems -- which allows you to write code that works with files and directories regardless of their source and location.
+
+Think of PyFilesystem (FS) objects as the next logical step to Python's _file_ objects. Just as file-like objects abstract a single file, FS objects abstract the whole filesystem by providing a common interface to operations such as reading directories, getting file information, opening/copying/deleting files etc.
+
+For example, if you had written a method that reads a few files from the local filesystem, it would be a trivial change if you later decided to read those files from a zip file or even over the Internet.