예제 #1
0
파일: S3fs.py 프로젝트: xiaolushare/pyS3fs
    def getattr(self, path, fh=None):
        logging.debug("getattr path={}, fh={}".format(path, fh))

        node = node_utils.get_node(self.root_node, path)
        if not node:
            raise FuseOSError(ENOENT)

        return node.get_attrs()
예제 #2
0
파일: S3fs.py 프로젝트: rbaron/pyS3fs
    def getattr(self, path, fh=None):
        logging.debug("getattr path={}, fh={}".format(path, fh))

        node = node_utils.get_node(self.root_node, path)
        if not node:
            raise FuseOSError(ENOENT)

        return node.get_attrs()
예제 #3
0
파일: S3fs.py 프로젝트: xiaolushare/pyS3fs
 def write(self, path, data, offset, fh):
     logging.debug("write path={} datalen={} offset={}".format(
         path, len(data), offset))
     if path not in self.cache_registry:
         self.cache_registry[path] = Cache(cache_type=CacheType.UPSTREAM, )
     self.cache_registry[path].append_data(data)
     node = node_utils.get_node(self.root_node, path)
     node.st_size = len(self.cache_registry[path].data)
     return len(data)
예제 #4
0
파일: S3fs.py 프로젝트: rbaron/pyS3fs
 def write(self, path, data, offset, fh):
     logging.debug("write path={} datalen={} offset={}".format(path, len(data), offset))
     if path not in self.cache_registry:
         self.cache_registry[path] = Cache(
             cache_type=CacheType.UPSTREAM,
         )
     self.cache_registry[path].append_data(data)
     node = node_utils.get_node(self.root_node, path)
     node.st_size = len(self.cache_registry[path].data)
     return len(data)
예제 #5
0
파일: S3fs.py 프로젝트: xiaolushare/pyS3fs
 def readdir(self, path, fh):
     logging.debug("readdir path: {}, fh: {}".format(path, fh))
     node = node_utils.get_node(self.root_node, path)
     return [n.name for n in node.children]
예제 #6
0
파일: S3fs.py 프로젝트: rbaron/pyS3fs
 def readdir(self, path, fh):
     logging.debug("readdir path: {}, fh: {}".format(path, fh))
     node = node_utils.get_node(self.root_node, path)
     return [n.name for n in node.children]