/** * ExecOptions 执行命令选项 */ export interface ExecOptions { /** 工作目录 */ cwd?: string; /** 环境变量 */ env?: Record; } /** * ShellResult 命令执行结果 */ export interface ShellResult { /** 退出码 */ code: number; /** 标准输出 */ stdout: string; /** 标准错误 */ stderr: string; /** 是否成功 */ success: boolean; } /** * Shell API 接口 */ export interface ShellAPI { /** 用系统默认浏览器打开 URL */ openExternal: (url: string) => Promise; /** 用系统默认程序打开文件/目录 */ openPath: (path: string) => Promise; /** 执行系统命令 */ execCommand: (command: string, options?: ExecOptions) => Promise; /** 将文件移到回收站 */ trashItem: (path: string) => Promise; } /** * 系统命令与外部程序相关 API */ export declare const shell: ShellAPI; //# sourceMappingURL=shell.d.ts.map