Files
MyReader/electron/ipc-types.ts
T
2026-05-15 16:35:31 +08:00

34 lines
551 B
TypeScript

export type DirEntry = {
name: string
path: string
kind: 'file' | 'dir'
}
export type ListDirResult = {
entries: DirEntry[]
error?: string
}
export type OpenFileResult = {
canceled: boolean
path?: string
content?: string
}
export type SaveDialogResult = {
canceled: boolean
path?: string
}
export type OpenFolderResult = {
canceled: boolean
path?: string
}
/** `url` 为可写入 Markdown 的 `file://` 绝对地址(已编码)。 */
export type OpenImageResult = {
canceled: boolean
url?: string
path?: string
}