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:])
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)
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)
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:])
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)
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)
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)
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)
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)
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)
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)
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:])
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)
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)
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)
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:])
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 )
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)
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)
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)
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)
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)
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)
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)
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)