-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5c2393
commit e80bd65
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |