Commit 24753d68 by rfkelly0

MountFS: add getpathurl() method

parent 2399a7c9
...@@ -15,7 +15,7 @@ implementations of this interface such as: ...@@ -15,7 +15,7 @@ implementations of this interface such as:
""" """
__version__ = "0.4.0a2" __version__ = "0.4.0a3"
__author__ = "Will McGugan (will@willmcgugan.com)" __author__ = "Will McGugan (will@willmcgugan.com)"
# 'base' imports * from 'path' and 'errors', so their # 'base' imports * from 'path' and 'errors', so their
......
...@@ -119,6 +119,15 @@ class MountFS(FS): ...@@ -119,6 +119,15 @@ class MountFS(FS):
else: else:
raise NoSysPathError(path=path) raise NoSysPathError(path=path)
return fs.getsyspath(delegate_path, allow_none=allow_none) return fs.getsyspath(delegate_path, allow_none=allow_none)
def getpathurl(self, path, allow_none=False):
fs, mount_path, delegate_path = self._delegate(path)
if fs is self or fs is None:
if allow_none:
return None
else:
raise NoPathURLError(path=path)
return fs.getpathurl(delegate_path, allow_none=allow_none)
@synchronize @synchronize
def desc(self, path): def desc(self, 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