Exemple #1
0
    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()
Exemple #2
0
    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()
Exemple #3
0
 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)
Exemple #4
0
 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)
Exemple #5
0
 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]
Exemple #6
0
 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]