Skip to content

Commit

Permalink
added getfile to multi and mount
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Jan 28, 2018
1 parent 3a06301 commit 202fc25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/mountfs.py
Expand Up @@ -159,6 +159,10 @@ def getbytes(self, path):
fs, _path = self._delegate(path)
return fs.getbytes(_path)

def getfile(self, path, file, chunk_size=None, **options):
fs, _path = self._delegate(path)
return fs.getfile(_path, file, chunk_size=chunk_size, **options)

def gettext(self, path, encoding=None, errors=None, newline=None):
self.check()
fs, _path = self._delegate(path)
Expand Down
4 changes: 4 additions & 0 deletions fs/multifs.py
Expand Up @@ -259,6 +259,10 @@ def getbytes(self, path):
raise errors.ResourceNotFound(path)
return fs.getbytes(path)

def getfile(self, path, file, chunk_size=None, **options):
fs = self._delegate_required(path)
return fs.getfile(path, file, chunk_size=chunk_size, **options)

def gettext(self, path, encoding=None, errors=None, newline=''):
self.check()
fs = self._delegate_required(path)
Expand Down

0 comments on commit 202fc25

Please sign in to comment.