API @deepkit/filesystem-google
npm install @deepkit/filesystem-google
Classes
export class FilesystemGoogleAdapter implements FilesystemAdapter {
client: Storage;
bucket: Bucket;
options: FilesystemGoogleOptions;
constructor(options: Partial<FilesystemGoogleOptions> = {});
supportsVisibility();
supportsDirectory();
async getVisibility(path: string): Promise<FileVisibility>;
async setVisibility(path: string, visibility: FileVisibility): Promise<void>;
publicUrl(path: string): string;
async close(): Promise<void>;
async makeDirectory(path: string, visibility: FileVisibility): Promise<void>;
async files(path: string): Promise<FilesystemFile[]>;
async allFiles(path: string): Promise<FilesystemFile[]>;
async getFiles(path: string, recursive: boolean = false): Promise<FilesystemFile[]>;
async get(path: string): Promise<FilesystemFile | undefined>;
async delete(paths: string[]): Promise<void>;
async deleteDirectory(path: string, reporter: Reporter): Promise<void>;
async exists(paths: string[]): Promise<boolean>;
async moveFile(source: string, destination: string): Promise<void>;
async copyFile(source: string, destination: string): Promise<void>;
async read(path: string, reporter: Reporter): Promise<Uint8Array>;
async write(path: string, contents: Uint8Array, visibility: FileVisibility, reporter: Reporter): Promise<void>;
}
Types
interface FilesystemGoogleOptions extends StorageOptions {
bucket: string;
path: string;
}