Beispiel #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()
Beispiel #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()
Beispiel #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)
Beispiel #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)
Beispiel #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]
Beispiel #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]