示例#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:])
示例#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)
示例#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)
示例#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:])
示例#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)
示例#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)
示例#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)
示例#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)
示例#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)
示例#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)
示例#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)
示例#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:])
示例#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)
示例#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)
示例#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)
示例#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:])
示例#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
     )
示例#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)
示例#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)
示例#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)
示例#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)
示例#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)
示例#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)
示例#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)
示例#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)