import { FileNode, ClipboardItem } from '../../../types'; import { RecycleBinItem } from '../utils/persistence'; /** * Content paths touched by an operation. `dirty` limits IndexedDB writes to * the listed files; omitting `changes` entirely requests a full content * rewrite (used by subtree operations like move/copy). See persistFs (#81). */ export interface PersistChanges { dirty?: string[][]; removed?: string[][]; } /** * DOM event dispatched for user-facing filesystem notices (e.g. a recycle-bin * item restored to the desktop because its original folder is gone). The App * shell listens and shows an XP dialog. */ export declare const FS_NOTICE_EVENT = "windows-xp:fs-notice"; export interface FsNoticeDetail { type: 'restore-fallback'; name: string; } export declare const useFileOperations: (setFs: React.Dispatch>, doPersistFs: (fs: { root: FileNode; }, changes?: PersistChanges) => void, recycleBinRef: React.MutableRefObject>) => { updateFile: (path: string[], updates: Partial) => void; createFile: (parentPath: string[], fileName: string, type?: "file" | "folder", properties?: Partial) => void; createFolder: (parentPath: string[], folderName: string) => void; renameFile: (parentPath: string[], oldName: string, newName: string) => void; deleteFile: (parentPath: string[], fileName: string) => void; deleteFolder: (parentPath: string[], folderName: string) => void; moveFile: (sourcePath: string[], fileName: string, destinationPath: string[], newName?: string) => void; copyFile: (sourcePath: string[], fileName: string, destinationPath: string[], newName?: string) => void; pasteFile: (destinationPath: string[], clipboard: ClipboardItem | null, fs?: { root: FileNode; }) => boolean; emptyRecycleBin: () => void; restoreFromRecycleBin: (binKey: string) => void; };