예제 #1
0
 def get_parents(self, path):
     paths = {}
     with self.lock:
         for (k, v) in list(six.iteritems(self._paths)):
             if utils.is_child_path(k, path, only_direct=False):
                 paths[k] = v
     return paths
예제 #2
0
 def get_children(self, path, only_direct=True):
     paths = {}
     with self.lock:
         for (k, v) in list(six.iteritems(self._paths)):
             if utils.is_child_path(path, k, only_direct=only_direct):
                 paths[k] = v
     return paths
예제 #3
0
 def get_parents(self, path):
     paths = {}
     with self.lock:
         for (other_path, data) in list(six.iteritems(self._paths)):
             if utils.is_child_path(other_path, path, only_direct=False):
                 paths[other_path] = data
     return paths
예제 #4
0
 def get_parents(self, path):
     paths = {}
     with self.lock:
         for (other_path, data) in list(six.iteritems(self._paths)):
             if utils.is_child_path(other_path, path, only_direct=False):
                 paths[other_path] = data
     return paths
예제 #5
0
 def get_children(self, path, only_direct=True):
     paths = {}
     with self.lock:
         for (other_path, data) in list(six.iteritems(self._paths)):
             if utils.is_child_path(path, other_path,
                                    only_direct=only_direct):
                 paths[other_path] = data
     return paths
예제 #6
0
 def get_children(self, path, only_direct=True):
     paths = {}
     with self.lock:
         for (other_path, data) in list(six.iteritems(self._paths)):
             if utils.is_child_path(path,
                                    other_path,
                                    only_direct=only_direct):
                 paths[other_path] = data
     return paths