From cc3306286c7653f210606eea57159ba162aa2ce3 Mon Sep 17 00:00:00 2001 From: Hans Meine Date: Mon, 23 Nov 2015 12:39:11 +0100 Subject: rename README for GitHub to properly render it --- README.md | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.txt | 67 -------------------------------------------------------------- 2 files changed, 67 insertions(+), 67 deletions(-) create mode 100644 README.md delete mode 100644 README.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..6ecd021 --- /dev/null +++ b/README.md @@ -0,0 +1,67 @@ +PyFilesystem +============ + +PyFilesystem is an abstraction layer for *filesystems*. In the same way that Python's file-like objects provide a common way of accessing files, PyFilesystem provides a common way of accessing entire filesystems. You can write platform-independent code to work with local files, that also works with any of the supported filesystems (zip, ftp, S3 etc.). + +Pyfilesystem works with Linux, Windows and Mac. + +Suported Filesystems +--------------------- + +Here are a few of the filesystems that can be accessed with Pyfilesystem: + +* **DavFS** access files & directories on a WebDAV server +* **FTPFS** access files & directories on an FTP server +* **MemoryFS** access files & directories stored in memory (non-permanent but very fast) +* **MountFS** creates a virtual directory structure built from other filesystems +* **MultiFS** a virtual filesystem that combines a list of filesystems into one, and checks them in order when opening files +* **OSFS** the native filesystem +* **SFTPFS** access files & directores stored on a Secure FTP server +* **S3FS** access files & directories stored on Amazon S3 storage +* **TahoeLAFS** access files & directories stored on a Tahoe distributed filesystem +* **ZipFS** access files and directories contained in a zip file + +Example +------- + +The following snippet prints the total number of bytes contained in all your Python files in `C:/projects` (including sub-directories):: + + from fs.osfs import OSFS + projects_fs = OSFS('C:/projects') + print sum(projects_fs.getsize(path) + for path in projects_fs.walkfiles(wildcard="*.py")) + +That is, assuming you are on Windows and have a directory called 'projects' in your C drive. If you are on Linux / Mac, you might replace the second line with something like:: + + projects_fs = OSFS('~/projects') + +If you later want to display the total size of Python files stored in a zip file, you could make the following change to the first two lines:: + + from fs.zipfs import ZipFS + projects_fs = ZipFS('source.zip') + +In fact, you could use any of the supported filesystems above, and the code would continue to work as before. + +An alternative to explicitly importing the filesystem class you want, is to use an FS opener which opens a filesystem from a URL-like syntax:: + + from fs.opener import fsopendir + projects_fs = fsopendir('C:/projects') + +You could change ``C:/projects`` to ``zip://source.zip`` to open the zip file, or even ``ftp://ftp.example.org/code/projects/`` to sum up the bytes of Python stored on an ftp server. + +Screencast +---------- + +This is from an early version of PyFilesystem, but still relevant + +http://vimeo.com/12680842 + +Discussion Group +---------------- + +http://groups.google.com/group/pyfilesystem-discussion + +Further Information +------------------- + +http://www.willmcgugan.com/tag/fs/ diff --git a/README.txt b/README.txt deleted file mode 100644 index 6ecd021..0000000 --- a/README.txt +++ /dev/null @@ -1,67 +0,0 @@ -PyFilesystem -============ - -PyFilesystem is an abstraction layer for *filesystems*. In the same way that Python's file-like objects provide a common way of accessing files, PyFilesystem provides a common way of accessing entire filesystems. You can write platform-independent code to work with local files, that also works with any of the supported filesystems (zip, ftp, S3 etc.). - -Pyfilesystem works with Linux, Windows and Mac. - -Suported Filesystems ---------------------- - -Here are a few of the filesystems that can be accessed with Pyfilesystem: - -* **DavFS** access files & directories on a WebDAV server -* **FTPFS** access files & directories on an FTP server -* **MemoryFS** access files & directories stored in memory (non-permanent but very fast) -* **MountFS** creates a virtual directory structure built from other filesystems -* **MultiFS** a virtual filesystem that combines a list of filesystems into one, and checks them in order when opening files -* **OSFS** the native filesystem -* **SFTPFS** access files & directores stored on a Secure FTP server -* **S3FS** access files & directories stored on Amazon S3 storage -* **TahoeLAFS** access files & directories stored on a Tahoe distributed filesystem -* **ZipFS** access files and directories contained in a zip file - -Example -------- - -The following snippet prints the total number of bytes contained in all your Python files in `C:/projects` (including sub-directories):: - - from fs.osfs import OSFS - projects_fs = OSFS('C:/projects') - print sum(projects_fs.getsize(path) - for path in projects_fs.walkfiles(wildcard="*.py")) - -That is, assuming you are on Windows and have a directory called 'projects' in your C drive. If you are on Linux / Mac, you might replace the second line with something like:: - - projects_fs = OSFS('~/projects') - -If you later want to display the total size of Python files stored in a zip file, you could make the following change to the first two lines:: - - from fs.zipfs import ZipFS - projects_fs = ZipFS('source.zip') - -In fact, you could use any of the supported filesystems above, and the code would continue to work as before. - -An alternative to explicitly importing the filesystem class you want, is to use an FS opener which opens a filesystem from a URL-like syntax:: - - from fs.opener import fsopendir - projects_fs = fsopendir('C:/projects') - -You could change ``C:/projects`` to ``zip://source.zip`` to open the zip file, or even ``ftp://ftp.example.org/code/projects/`` to sum up the bytes of Python stored on an ftp server. - -Screencast ----------- - -This is from an early version of PyFilesystem, but still relevant - -http://vimeo.com/12680842 - -Discussion Group ----------------- - -http://groups.google.com/group/pyfilesystem-discussion - -Further Information -------------------- - -http://www.willmcgugan.com/tag/fs/ -- cgit v1.2.1 From ff1d328191d8f6a204683e0b21d21648b4070d3c Mon Sep 17 00:00:00 2001 From: Hans Meine Date: Mon, 7 Dec 2015 20:50:56 +0100 Subject: reflect README.md rename in MANIFEST.in/setup.py --- MANIFEST.in | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 2720cd5..c7a8b83 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ include AUTHORS -include README.txt +include README.md include LICENSE.txt include CHANGES.txt \ No newline at end of file diff --git a/setup.py b/setup.py index 315de5e..92c405c 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ classifiers = [ 'Topic :: System :: Filesystems', ] -with open('README.txt', 'r') as f: +with open('README.md', 'r') as f: long_desc = f.read() -- cgit v1.2.1