Skip to content

Instantly share code, notes, and snippets.

@mastro35
Created February 27, 2017 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mastro35/fc1937dfb13653c6d6a8848864384abf to your computer and use it in GitHub Desktop.
Save mastro35/fc1937dfb13653c6d6a8848864384abf to your computer and use it in GitHub Desktop.
def readdir(self, path, fh):
dirents = ['.', '..']
full_path = self._full_path(path)
# print("listing " + full_path)
if os.path.isdir(full_path):
dirents.extend(os.listdir(full_path))
if self.fallbackPath not in full_path:
full_path = self._full_path(path, useFallBack=True)
# print("listing_ext " + full_path)
if os.path.isdir(full_path):
dirents.extend(os.listdir(full_path))
for r in list(set(dirents)):
yield r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment