Beispiel #1
0
    def opendir(self, path):
        """Opens a directory and returns a FS object representing its contents.

        :param path: path to directory to open
        :rtype: an FS object
        
        """

        from fs.wrapfs.subfs import SubFS
        if not self.exists(path):
            raise ResourceNotFoundError(path)
        return SubFS(self, path)
Beispiel #2
0
 def _setup(self):
     if make:
         fs.makedir(path, allow_recreate=True, recursive=make_recursive)
     elif not fs.exists(path):
         raise ResourceNotFoundError(path)
     self._wrapped = SubFS(fs, path)