feat: object storage

This commit is contained in:
Thomas Way
2024-02-18 23:16:45 +00:00
parent 8e1c85fe4f
commit 96a2725c3e
7 changed files with 2936 additions and 4 deletions
+27
View File
@@ -0,0 +1,27 @@
import { Readable, Writable } from "node:stream";
export interface FS {
// create creates an object with the given name.
create(name: string): Promise<Writable>;
// open opens the named object.
open(name: string): Promise<Readable>;
// remove removes the named object.
remove(name: string): Promise<void>;
}
// export interface FS {
// // create creates an object with the given name.
// create(name: string): Promise<WritableFile>;
// // open opens the object with the given name.
// open(name: string): Promise<ReadableFile>;
// // remove removes the named object.
// remove(name: string): Promise<void>;
// }
// export interface File {
// createReadableStream(): Promise<Readable>;
// }