Commit 777a11d3 by rfkelly0

SubFS: directly delegate createfile/setcontents/getcontents

This is handy if the parent FS provides a more efficient implementation than the base FS class.
parent 0288328a
......@@ -919,6 +919,15 @@ class SubFS(FS):
def copydir(self, src, dst, **kwds):
self.parent.copydir(self._delegate(src),self._delegate(dst),**kwds)
def createfile(self, path, data=""):
return self.parent.createfile(self._delegate(path),data)
def setcontents(self, path, data=""):
return self.parent.setcontents(self._delegate(path),data)
def getcontents(self, path):
return self.parent.getcontents(self._delegate(path))
def flags_to_mode(flags):
"""Convert an os.O_* flag bitmask into an FS mode string."""
......
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