Files
plainleaf/web/syscalls/sync.ts
T
Zef Hemel a321339e9a Fixes #1495
Renames sync.* syscalls to be more accurate, specifically that this is not about scheduling a sync but actually performing the sync.
2025-08-20 10:58:30 +02:00

20 lines
664 B
TypeScript

import type { SysCallMapping } from "../../lib/plugos/system.ts";
import type { Client } from "../client.ts";
export function syncSyscalls(editor: Client): SysCallMapping {
return {
"sync.isSyncing": (): Promise<boolean> => {
return editor.syncService.isSyncing();
},
"sync.hasInitialSyncCompleted": (): Promise<boolean> => {
return editor.syncService.hasInitialSyncCompleted();
},
"sync.performFileSync": (_ctx, path: string): Promise<void> => {
return editor.syncService.performFileSync(path);
},
"sync.performSpaceSync": (): Promise<number> => {
return editor.syncService.performSpaceSync();
},
};
}