flydrive
Version:
File storage library with unified API to manage files across multiple cloud storage providers like S3, GCS, R2 and so on
33 lines (32 loc) • 951 B
TypeScript
import { Disk } from './disk.js';
import { FSDriver } from '../drivers/fs/driver.js';
import type { DriveManagerOptions } from './types.js';
/**
* FakeDisk extends the Disk class with additional capabilities to
* write assertions.
*/
export declare class FakeDisk extends Disk {
#private;
disk: string;
driver: FSDriver;
constructor(disk: string, fakesConfig: Exclude<DriveManagerOptions<any>['fakes'], undefined>);
/**
* Set the function to call when the fake is disposed
*/
onRestore(fn: () => void): this;
[Symbol.dispose](): void;
/**
* Assert the expected file(s) exists. Otherwise an assertion
* error is thrown
*/
assertExists(paths: string | string[]): void;
/**
* Assert the expected file(s) to not exist. Otherwise an assertion
* error is thrown
*/
assertMissing(paths: string | string[]): void;
/**
* Clear storage
*/
clear(): void;
}