Commit d33a4a74 by rfkelly0

add docs for latest additions

parent cef41331
3rd-Party Filesystems
=====================
This page lists filesystem implementations that have been contributed by
third parties. They may be less well tested than those found in the main
module namespace.
DAV (WebDAV Protocol)
----------------------------
An interface to WebDAV file servers. See :mod:`fs.contrib.davfs`
BIG (BIG Archive File Format)
-----------------------------
A read-only interface to the BIG archive file format used in some EA games titles (e.g. Command & Conquery 4). See :mod:`fs.contrib.bigfs`
.. automodule:: fs.contrib.bigfs
:members:
.. automodule:: fs.contrib.davfs
:members:
fs.contrib
=========
The ``fs.contrib`` module contains a number of filesystem implementations provided by third parties.
.. toctree::
:maxdepth: 3
davfs.rst
bigfs.rst
...@@ -8,6 +8,10 @@ FUSE ...@@ -8,6 +8,10 @@ FUSE
---- ----
Makes an FS object available to other applications on the system. See :mod:`fs.expose.fuse`. Makes an FS object available to other applications on the system. See :mod:`fs.expose.fuse`.
Dokan
-----
Makes an FS object available to other applications on the system. See :mod:`fs.expose.dokan`.
Secure FTP Secure FTP
---------- ----------
Makes an FS object available via Secure FTP. See :mod:`fs.expose.sftp`. Makes an FS object available via Secure FTP. See :mod:`fs.expose.sftp`.
......
.. automodule:: fs.expose.dokan
:members:
...@@ -7,6 +7,7 @@ The ``fs.expose`` module contains a number of options for making an FS implement ...@@ -7,6 +7,7 @@ The ``fs.expose`` module contains a number of options for making an FS implement
:maxdepth: 3 :maxdepth: 3
fuse.rst fuse.rst
dokan.rst
sftp.rst sftp.rst
xmlrpc.rst xmlrpc.rst
django_storage.rst django_storage.rst
...@@ -19,6 +19,7 @@ Guide ...@@ -19,6 +19,7 @@ Guide
concepts.rst concepts.rst
interface.rst interface.rst
filesystems.rst filesystems.rst
contrib.rst
expose.rst expose.rst
Code Documentation Code Documentation
...@@ -45,6 +46,7 @@ Code Documentation ...@@ -45,6 +46,7 @@ Code Documentation
utils.rst utils.rst
wrapfs/index.rst wrapfs/index.rst
zipfs.rst zipfs.rst
contrib/index.rst
Indices and tables Indices and tables
......
# Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd.
# All rights reserved; available under the terms of the MIT License.
""" """
fs.contrib.davfs
================
fs.contrib.davfs: FS implementation accessing a WebDAV server. FS implementation accessing a WebDAV server.
This module provides a relatively-complete WebDAV Level 1 client that exposes This module provides a relatively-complete WebDAV Level 1 client that exposes
a WebDAV server as an FS object. Locks are not currently supported. a WebDAV server as an FS object. Locks are not currently supported.
...@@ -12,6 +13,8 @@ Requires the dexml module: ...@@ -12,6 +13,8 @@ Requires the dexml module:
http://pypi.python.org/pypi/dexml/ http://pypi.python.org/pypi/dexml/
""" """
# Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd.
# All rights reserved; available under the terms of the MIT License.
import os import os
import httplib import httplib
......
""" """
fs.expose.dokan fs.expose.dokan
============== ===============
Expose an FS object to the native filesystem via Dokan. Expose an FS object to the native filesystem via Dokan.
...@@ -45,6 +45,8 @@ win32, this should work without further configuration on just about all ...@@ -45,6 +45,8 @@ win32, this should work without further configuration on just about all
systems with Dokan installed. systems with Dokan installed.
""" """
# Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd.
# All rights reserved; available under the terms of the MIT License.
import sys import sys
if sys.platform != "win32": if sys.platform != "win32":
......
# Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd.
# All rights reserved; available under the terms of the MIT License.
""" """
fs.expose.dokan.libdokan: low-level ctypes interface to Dokan fs.expose.dokan.libdokan: low-level ctypes interface to Dokan
......
...@@ -137,7 +137,8 @@ class OSFS(OSFSXAttrMixin, OSFSWatchMixin, FS): ...@@ -137,7 +137,8 @@ class OSFS(OSFSXAttrMixin, OSFSWatchMixin, FS):
""" """
path = os.path.normpath(os.path.abspath(path)) path = os.path.normpath(os.path.abspath(path))
if not path.startswith(self.root_path + os.path.sep): prefix = os.path.normcase(self.root_path) + os.path.sep
if not os.path.normcase(path).startswith(prefix):
raise ValueError("path not within this FS: %s" % (path,)) raise ValueError("path not within this FS: %s" % (path,))
return path[len(self.root_path):] return path[len(self.root_path):]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment