@hashgraph/solo
Version:
An opinionated CLI tool to deploy and manage private Hedera Networks.
26 lines (25 loc) • 1.3 kB
TypeScript
import { type StorageBackend } from '../api/storage-backend.js';
import { StorageOperation } from '../api/storage-operation.js';
/**
* A file storage backend that operates on files within a specified base path. This backend does not support recursive
* operations into subfolders and only operates on files contained within the specified base path. All directory entries
* are ignored.
*/
export declare class FileStorageBackend implements StorageBackend {
readonly basePath: string;
/**
* Creates a new file storage backend bound to the specified base path. The basic file storage backend does not support
* recursive operations into subfolders and only operates on files contained within the specified base path.
* All directory entries are ignored.
*
* @param basePath - The base path to use for all file operations.
* @throws IllegalArgumentError if the base path is null, undefined, or empty.
* @throws StorageBackendError if the base path does not exist or is not a directory.
*/
constructor(basePath: string);
isSupported(op: StorageOperation): boolean;
list(): Promise<string[]>;
readBytes(key: string): Promise<Buffer>;
writeBytes(key: string, data: Buffer): Promise<void>;
delete(key: string): Promise<void>;
}