silverbullet/plug-api/syscalls/sync.ts

18 lines
461 B
TypeScript
Raw Normal View History

import { syscall } from "../syscall.ts";
2023-01-13 22:41:29 +08:00
export function isSyncing(): Promise<boolean> {
return syscall("sync.isSyncing");
2023-01-13 22:41:29 +08:00
}
export function hasInitialSyncCompleted(): Promise<boolean> {
return syscall("sync.hasInitialSyncCompleted");
2023-01-13 22:41:29 +08:00
}
export function scheduleFileSync(path: string): Promise<void> {
return syscall("sync.scheduleFileSync", path);
}
2023-08-16 02:24:02 +08:00
export function scheduleSpaceSync(): Promise<number> {
return syscall("sync.scheduleSpaceSync");
}