interface StorageAdapter

Low-level storage adapter interface. Implement this to create drivers for specific storage backends.

Methods

put(
key: string,
body: BodyInput,
options?: PutOptions,
): Promise<void>

Put an object into storage.

get(key: string): Promise<StorageObject>

Get an object from storage.

delete(key: string): Promise<void>

Delete an object from storage.

head(key: string): Promise<StorageMetadata>

Get metadata without fetching the body.

list(prefix?: string): AsyncIterable<StorageEntry>

List objects with optional prefix.

close(): Promise<void>

Release the connection back to its source.

Usage

import { type StorageAdapter } from ".";