If the path referred to is a directory, return the elements of
that diectory
"""
- obj = self._get_file(path)
- if type(obj) is not Directory:
- return
- else:
- for member in ['.', '..'] + obj:
- yield fuse.Direntry(str(member))
+ return self._get_file(path).readdir(offset)
def getattr(self, path):
"""
class TreeKey(object):
def getattr(self):
return -errno.EINVAL
+ def readdir(self, offset):
+ return -errno.EINVAL
class NoEntry(TreeKey):
def getattr(self):
return -errno.ENOENT
+ def readdir(self, offset):
+ return -errno.ENOENT
class TreeEntry(TreeKey):
default_mode = 0444
st.st_nlink = 2
return st
+ def readdir(self, offset):
+ for member in ['.', '..'] + self:
+ yield fuse.Direntry(str(member))
+
class Symlink(TreeEntry, str):
"""
A dummy class representing something that should be a symlink