Lint & format
This commit is contained in:
parent
27423bf3cd
commit
ca225a71be
17 changed files with 94 additions and 83 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue