mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-04 21:32:39 +02:00
feat: add seedFolderMtimes API for seeding file modification times during folder synchronization
This commit is contained in:
parent
e8c2377824
commit
d009d06432
6 changed files with 48 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ export const IPC_CHANNELS = {
|
|||
FOLDER_SYNC_GET_PENDING_EVENTS: 'folder-sync:get-pending-events',
|
||||
FOLDER_SYNC_ACK_EVENTS: 'folder-sync:ack-events',
|
||||
FOLDER_SYNC_LIST_FILES: 'folder-sync:list-files',
|
||||
FOLDER_SYNC_SEED_MTIMES: 'folder-sync:seed-mtimes',
|
||||
BROWSE_FILES: 'browse:files',
|
||||
READ_LOCAL_FILES: 'browse:read-local-files',
|
||||
// Auth token sync across windows
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import {
|
|||
browseFiles,
|
||||
readLocalFiles,
|
||||
listFolderFiles,
|
||||
seedFolderMtimes,
|
||||
type WatchedFolderConfig,
|
||||
} from '../modules/folder-watcher';
|
||||
import { getShortcuts, setShortcuts, type ShortcutConfig } from '../modules/shortcuts';
|
||||
|
|
@ -97,6 +98,12 @@ export function registerIpcHandlers(): void {
|
|||
listFolderFiles(config)
|
||||
);
|
||||
|
||||
ipcMain.handle(
|
||||
IPC_CHANNELS.FOLDER_SYNC_SEED_MTIMES,
|
||||
(_event, folderPath: string, mtimes: Record<string, number>) =>
|
||||
seedFolderMtimes(folderPath, mtimes),
|
||||
);
|
||||
|
||||
ipcMain.handle(IPC_CHANNELS.BROWSE_FILES, () => browseFiles());
|
||||
|
||||
ipcMain.handle(IPC_CHANNELS.READ_LOCAL_FILES, (_event, paths: string[]) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue