Opening Filesystems mdash; PyFilesystem v0.4.0 documentation packages.python.org6Kb2012-11-26http://packages.python.org/fs/opening.html fsopendir my fs fsopendir 39; foo bar 39; The fsopendir callable takes a string that identifies the filesystem with a URI syntax, but if called with a regular path will return an OSFS instance. To open a different kind of filesystem, precede the path with the required protocol. For example, the following code opens an FTP filesystem rather than a directory on your hard.drive from fs.opener import fsopendir my fs fsopendir 39;ftp
Where there is a Will www.willmcgugan.com50Kb2012-11-16 blog http://www.willmcgugan.com fsopendir app fs fsopendir 39;mount fs.ini 39;, create dir True That, all there is to it; two lines of code one if you don t count the import. Obviously there is quite a bit going on under the hood here, which I ll explain below, but lets see what this code gives you 8230; The app fs object is an interface to a single filesystem that contains all the file locations our application will use. For example, the path user app.ini
Where there is a Will www.willmcgugan.com50Kb2012-11-16bloghttp://www.willmcgugan.com fsopendir app fs fsopendir 39;mount fs.ini 39;, create dir True That, all there is to it; two lines of code one if you don t count the import. Obviously there is quite a bit going on under the hood here, which I ll explain below, but lets see what this code gives you 8230; The app fs object is an interface to a single filesystem that contains all the file locations our application will use. For example, the path user app.ini