Lint files

This commit is contained in:
Andras Schmelczer 2024-12-20 16:14:46 +00:00
parent 2f7cad602a
commit ff5af8aea5
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
11 changed files with 184 additions and 276 deletions

View file

@ -1,22 +1,22 @@
import { RelativePath } from "src/database/document-metadata";
import type { RelativePath } from "src/database/document-metadata";
export interface FileOperations {
listAllFiles(): Promise<RelativePath[]>;
listAllFiles: () => Promise<RelativePath[]>;
read(path: RelativePath): Promise<Uint8Array>;
read: (path: RelativePath) => Promise<Uint8Array>;
getModificationTime(path: RelativePath): Promise<Date>;
getModificationTime: (path: RelativePath) => Promise<Date>;
create(path: RelativePath, newContent: Uint8Array): Promise<void>;
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.
write(
write: (
path: RelativePath,
expectedContent: Uint8Array,
newContent: Uint8Array
): Promise<Uint8Array>;
) => Promise<Uint8Array>;
remove(path: RelativePath): Promise<void>;
remove: (path: RelativePath) => Promise<void>;
move(oldPath: RelativePath, newPath: RelativePath): Promise<void>;
move: (oldPath: RelativePath, newPath: RelativePath) => Promise<void>;
}