Skip to content

Commit

Permalink
changelogs and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Dec 3, 2016
1 parent f5c2393 commit e80bd65
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Change Log
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Added

### Changed


## [2.0.0] - 2016-12-02
### Added

### Changed


35 changes: 35 additions & 0 deletions docs/source/openers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FS URLs
=======

PyFilesystem can open filesystems via a FS URL, which are similar to the URLs you might enter in to a browser.

Using FS URLs can be useful if you want to be able to specify a filesystem dynamically, in a conf file (for instance).

FS URLs are parsed in to the following format::

<type>://<username>:<password>@<resource>


The components are as follows:

* ``<type>`` Identifies the type of filesystem to create. e.g. ``osfs``, ``ftp``.
* ``<username>`` Optional username.
* ``<password>`` Optional password.
* ``<resource>`` A *resource*, which may be a domain, path, or both.

Here are a few examples::

osfs://~/projects
osfs://c://system32
ftp://ftp.example.org/pub
mem://

If ``<type>`` is not specified then it is assumed to be an :class:`~fs.osfs.OSFS`. The following FS URLs are equivalent::

osfs://~/projects
~/projects

To open a filesysem with a FS URL, you can use :meth:`~fs.opener.Registry.open_fs`, which may be imported and used as follows::

from fs import open_fs
projects_fs = open_fs('osfs://~/projects')

0 comments on commit e80bd65

Please sign in to comment.