Add more file operations

This commit is contained in:
Andras Schmelczer 2024-12-18 20:35:36 +00:00
parent d069cbdb67
commit c0fd041532
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
2 changed files with 15 additions and 0 deletions

View file

@ -1,8 +1,12 @@
import { RelativePath } from "src/database/document-metadata";
export interface FileOperations {
listAllFiles(): Promise<RelativePath[]>;
read(path: RelativePath): Promise<Uint8Array>;
getModificationTime(path: RelativePath): Promise<Date>;
create(path: RelativePath, newContent: Uint8Array): Promise<void>;
// Writes new content to the file at the given path. If the file's content has changed since the expectedContent was read, the write will merge the changes.