Lint & format

This commit is contained in:
Andras Schmelczer 2025-02-22 17:25:26 +00:00
parent 27423bf3cd
commit ca225a71be
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
17 changed files with 94 additions and 83 deletions

View file

@ -1,6 +1,6 @@
import { Logger } from "src/tracing/logger";
import { FileSystemOperations } from "./filesystem-operations";
import { RelativePath } from "src/persistence/database";
import type { Logger } from "src/tracing/logger";
import type { FileSystemOperations } from "./filesystem-operations";
import type { RelativePath } from "src/persistence/database";
import { isBinary, isFileTypeMergable, mergeText } from "sync_lib";
export class FileOperations {
@ -138,7 +138,7 @@ export class FileOperations {
await this.fs.rename(oldPath, newPath);
}
public isFileEligibleForSync(path: RelativePath): boolean {
public isFileEligibleForSync(_path: RelativePath): boolean {
return true;
// TODO: figure this out
// if (Platform.isDesktopApp) {

View file

@ -1,17 +1,17 @@
import { RelativePath } from "src/persistence/database";
import type { RelativePath } from "src/persistence/database";
export interface FileSystemOperations {
listAllFiles(): Promise<RelativePath[]>;
read(path: RelativePath): Promise<Uint8Array>;
write(path: RelativePath, content: Uint8Array): Promise<void>;
atomicUpdateText(
listAllFiles: () => Promise<RelativePath[]>;
read: (path: RelativePath) => Promise<Uint8Array>;
write: (path: RelativePath, content: Uint8Array) => Promise<void>;
atomicUpdateText: (
path: RelativePath,
updater: (currentContent: string) => string
): Promise<string>;
getFileSize(path: RelativePath): Promise<number>;
getModificationTime(path: RelativePath): Promise<Date>;
exists(path: RelativePath): Promise<boolean>;
createDirectory(path: RelativePath): Promise<void>;
delete(path: RelativePath): Promise<void>;
rename(oldPath: RelativePath, newPath: RelativePath): Promise<void>;
) => Promise<string>;
getFileSize: (path: RelativePath) => Promise<number>;
getModificationTime: (path: RelativePath) => Promise<Date>;
exists: (path: RelativePath) => Promise<boolean>;
createDirectory: (path: RelativePath) => Promise<void>;
delete: (path: RelativePath) => Promise<void>;
rename: (oldPath: RelativePath, newPath: RelativePath) => Promise<void>;
}