Exemplo n.º 1
0
    def get_directory(self, object_tree_folder, path):
        log.debug('get_directory: {}'.format(util.string_from_path_elements(path)))

        if len(path) <= 2:
            return self._get_directory(object_tree_folder, path)

        return self._resource_map_resolver.get_directory(object_tree_folder, path[2:])
Exemplo n.º 2
0
 def get_attributes(self, object_tree_root, path):
     log.debug('get_attributes: {}'.format(util.string_from_path_elements(path)))
     if not path:
         return attributes.Attributes(is_dir=True)
     if self._is_readme_file(path):
         return self._get_readme_file_attributes()
     return self._resource_map_resolver.get_attributes(object_tree_root, path)
Exemplo n.º 3
0
 def read_file(self, object_tree_root, path, size, offset):
     log.debug(
         'read_file: {}, {}, {}'.format(
             util.string_from_path_elements(path), size, offset
         )
     )
     return self._read_file(object_tree_root, path, size, offset)
Exemplo n.º 4
0
  def get_directory(self, object_tree_folder, path):
    log.debug('get_directory: {}'.format(util.string_from_path_elements(path)))

    if len(path) <= 2:
      return self._get_directory(object_tree_folder, path)

    return self._resource_map_resolver.get_directory(path[2:])
Exemplo n.º 5
0
 def get_directory(self, object_tree_root, path):
     log.debug('get_directory: {}'.format(
         util.string_from_path_elements(path)))
     if not path:
         return self._get_directory(object_tree_root, path)
     return self._resource_map_resolver.get_directory(
         object_tree_root, path)
Exemplo n.º 6
0
    def read_file(self, object_tree_folder, path, size, offset):
        log.debug(
            'read_file: {}, {}, {}'.format(
                util.string_from_path_elements(path), size, offset
            )
        )

        return self._read_file(object_tree_folder, path, size, offset)
Exemplo n.º 7
0
 def get_attributes(self, object_tree_root, path):
   log.debug('get_attributes: {}'.format(util.string_from_path_elements(path)))
   if not path:
     return attributes.Attributes(is_dir=True)
   if self._is_readme_file(path):
     return self._get_readme_file_attributes()
   self._object_tree.add_object_to_cache(path[-1])
   return self._resource_map_resolver.get_attributes(object_tree_root, path)
Exemplo n.º 8
0
 def get_directory(self, object_tree_root, path):
   log.debug('get_directory: {}'.format(util.string_from_path_elements(path)))
   if not path:
     return [self._get_readme_filename()] \
       + self._object_tree._get_individually_synced_object_pids()
   else:
     self._object_tree.add_object_to_cache(path[-1])
     return self._resource_map_resolver.get_directory(object_tree_root, path)
Exemplo n.º 9
0
 def read_file(self, object_tree_root, path, size, offset):
     log.debug(u'read_file: {}, {}, {}'.format(
         util.string_from_path_elements(path), size, offset))
     if self._is_readme_file(path):
         return self._get_readme_text(size, offset)
     self._object_tree.add_object_to_cache(path[-1])
     return self._resource_map_resolver.read_file(object_tree_root, path,
                                                  size, offset)
Exemplo n.º 10
0
 def read_file(self, object_tree_folder, path, size, offset):
     log.debug('read_file: {}, {}, {}'.format(
         util.string_from_path_elements(path), size, offset))
     if self._is_readme_file(path):
         return self._get_readme_text(size, offset)
     if len(path) <= 2:
         raise onedrive_exceptions.PathException('Invalid file')
     return self._resource_map_resolver.read_file(path[2:], size, offset)
Exemplo n.º 11
0
 def read_file(self, object_tree_root, path, size, offset):
     log.debug("read_file: {}, {}, {}".format(
         util.string_from_path_elements(path), size, offset))
     if not path:
         raise onedrive_exceptions.PathException("Invalid file")
     if self._is_readme_file(path):
         return self._get_readme_text(size, offset)
     return self._resource_map_resolver.read_file(object_tree_root, path,
                                                  size, offset)
Exemplo n.º 12
0
    def get_attributes(self, object_tree_folder, path):
        log.debug('get_attributes: {}'.format(util.string_from_path_elements(path)))
        if self._is_readme_file(path):
            return self._get_readme_file_attributes()

        if len(path) <= 2:
            return self._get_attributes(path)

        return self._resource_map_resolver.get_attributes(object_tree_folder, path[2:])
Exemplo n.º 13
0
 def get_directory(self, object_tree_root, path):
     log.debug('get_directory: {}'.format(util.string_from_path_elements(path)))
     if not path:
         return [
             self._get_readme_filename()
         ] + self._object_tree._get_individually_synced_object_pids()
     else:
         self._object_tree.add_object_to_cache(path[-1])
         return self._resource_map_resolver.get_directory(object_tree_root, path)
Exemplo n.º 14
0
 def read_file(self, object_tree_root, path, size, offset):
     log.debug("read_file: {}, {}, {}".format(
         util.string_from_path_elements(path), size, offset))
     if self._is_readme_file(path):
         return self._get_readme_text(size, offset)
     if len(path) > 1 and self._is_resource_map(path[0]):
         return self._d1_object_resolver.read_file(object_tree_root,
                                                   path[1:], size, offset)
     return self._d1_object_resolver.read_file(object_tree_root, path, size,
                                               offset)
Exemplo n.º 15
0
 def read_file(self, object_tree_folder, path, size, offset):
     log.debug(
         'read_file: {}, {}, {}'.format(
             util.string_from_path_elements(path), size, offset
         )
     )
     if self._is_readme_file(path):
         return self._get_readme_text(size, offset)
     if len(path) <= 2:
         raise onedrive_exceptions.PathException('Invalid file')
     return self._resource_map_resolver.read_file(path[2:], size, offset)
Exemplo n.º 16
0
    def get_attributes(self, object_tree_folder, path):
        log.debug('get_attributes: {}'.format(
            util.string_from_path_elements(path)))
        if self._is_readme_file(path):
            return self._get_readme_file_attributes()

        if len(path) <= 2:
            return self._get_attributes(path)

        return self._resource_map_resolver.get_attributes(
            object_tree_folder, path[2:])
Exemplo n.º 17
0
 def read_file(self, object_tree_root, path, size, offset):
     log.debug(
         'read_file: {}, {}, {}'.format(
             util.string_from_path_elements(path), size, offset
         )
     )
     if self._is_readme_file(path):
         return self._get_readme_text(size, offset)
     self._object_tree.add_object_to_cache(path[-1])
     return self._resource_map_resolver.read_file(
         object_tree_root, path, size, offset
     )
Exemplo n.º 18
0
 def get_directory(self, object_tree_root, path):
     log.debug('get_directory: {}'.format(util.string_from_path_elements(path)))
     is_resource_map = self._is_resource_map(path[0])
     if not is_resource_map:
         return self._d1_object_resolver.get_directory(object_tree_root, path)
     if len(path) > 1:
         if is_resource_map:
             return self._d1_object_resolver.get_directory(
                 object_tree_root, path[1:]
             )
         else:
             return self._d1_object_resolver.get_directory(object_tree_root, path)
     return self._get_directory(object_tree_root, path)
Exemplo n.º 19
0
 def read_file(self, object_tree_root, path, size, offset):
     log.debug(
         'read_file: {}, {}, {}'.format(
             util.string_from_path_elements(path), size, offset
         )
     )
     if self._is_readme_file(path):
         return self._get_readme_text(size, offset)
     if len(path) > 1 and self._is_resource_map(path[0]):
         return self._d1_object_resolver.read_file(
             object_tree_root, path[1:], size, offset
         )
     return self._d1_object_resolver.read_file(object_tree_root, path, size, offset)
Exemplo n.º 20
0
 def get_attributes(self, object_tree_root, path):
     log.debug('get_attributes: {}'.format(util.string_from_path_elements(path)))
     if self._is_readme_file(path):
         return self._get_readme_file_attributes()
     is_resource_map = self._is_resource_map(path[0])
     if not is_resource_map:
         return self._d1_object_resolver.get_attributes(object_tree_root, path)
     if len(path) > 1:
         if is_resource_map:
             return self._d1_object_resolver.get_attributes(
                 object_tree_root, path[1:]
             )
         else:
             return self._d1_object_resolver.get_attributes(object_tree_root, path)
     return self._get_attributes(object_tree_root, path)
Exemplo n.º 21
0
 def get_attributes(self, object_tree_root, path):
     log.debug("get_attributes: {}".format(
         util.string_from_path_elements(path)))
     return self._get_attributes(object_tree_root, path)
Exemplo n.º 22
0
 def get_directory(self, object_tree_root, path):
     log.debug('get_directory: {}'.format(util.string_from_path_elements(path)))
     if not path:
         return self._get_directory(object_tree_root, path)
     return self._resource_map_resolver.get_directory(object_tree_root, path)
Exemplo n.º 23
0
 def get_directory(self, object_tree_root, path):
     log.debug("get_directory: {}".format(
         util.string_from_path_elements(path)))
     return self._get_directory(object_tree_root, path)
Exemplo n.º 24
0
    def get_directory(self, object_tree_folder, path):
        log.debug('get_directory: {}'.format(util.string_from_path_elements(path)))

        return self._get_directory(object_tree_folder, path)
Exemplo n.º 25
0
    def get_attributes(self, object_tree_folder, path):
        log.debug('get_attributes: {}'.format(util.string_from_path_elements(path)))

        return self._get_attributes(object_tree_folder, path)