$paths * @return \Generator contents by path * @throws BackendException for an object that cannot be read */ public function getMany(array $paths): \Generator; /** @return string bytes [$offset, $offset + $length) of the object (used to fetch single blobs from a pack) */ public function getRange(string $path, int $offset, int $length): string; /** * Many byte ranges, in the order given (blobs spread over many packs, such as the tree * segments of a backup). A backend where every request costs a round trip can fetch them * several at a time. * * @param list $ranges [path, offset, length] each * @return \Generator contents by position in $ranges * @throws BackendException for a range that cannot be read */ public function getRanges(array $ranges): \Generator; public function exists(string $path): bool; /** * Move an object within the same location (used for the trash). Backends must use a native * rename, not a read+write copy: some storages (e.g. SFTP) cannot reliably read and write on * the same connection at once, since the read side is a lazily-pulled stream. */ public function move(string $from, string $to): void; /** @return list object paths below $prefix (recursive) */ public function list(string $prefix): array; /** * Object paths directly in $dir, for a folder that only holds objects (index/, snapshots/, * catalog/, trash/info/). One listing, without checking the type of every entry: on a remote * storage list() costs a round trip per entry, which for index/ (one file per pack) grows * with the size of the repository. * * @return list */ public function listFiles(string $dir): array; public function delete(string $path): void; }