- 文件剪贴板复制剪切粘贴,重名自动副本 - SFTP下载到本机与外部文件拖入,目录递归 - 传输进度浮动面板,transfer-progress事件链 - Drawio预览,Excel工作线程,冻结看门狗 - cmd与bat自写batch语法高亮,psm1等映射补齐
798 lines
24 KiB
TypeScript
798 lines
24 KiB
TypeScript
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
// This file is automatically generated. DO NOT EDIT
|
|
|
|
/**
|
|
* App 应用结构体
|
|
* @module
|
|
*/
|
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore: Unused imports
|
|
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore: Unused imports
|
|
import * as application$0 from "../github.com/wailsapp/wails/v3/pkg/application/models.js";
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore: Unused imports
|
|
import * as filesystem$0 from "./internal/filesystem/models.js";
|
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore: Unused imports
|
|
import * as $models from "./models.js";
|
|
|
|
/**
|
|
* BgmGetPlaylist 获取播放列表
|
|
*/
|
|
export function BgmGetPlaylist(): $CancellablePromise<$models.BgmPlaylistItem[]> {
|
|
return $Call.ByID(3200870077).then(($result: any) => {
|
|
return $$createType1($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* BgmSavePlaylist 全量保存播放列表(前端调用时传完整列表)
|
|
*/
|
|
export function BgmSavePlaylist(items: $models.BgmPlaylistItem[]): $CancellablePromise<void> {
|
|
return $Call.ByID(2929660002, items);
|
|
}
|
|
|
|
/**
|
|
* CheckUpdate 检查更新
|
|
*/
|
|
export function CheckUpdate(): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(586574094).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* ClearCache 清理本地缓存(用于菜单项)
|
|
*/
|
|
export function ClearCache(): $CancellablePromise<void> {
|
|
return $Call.ByID(1413834504);
|
|
}
|
|
|
|
/**
|
|
* CopyPath 复制文件或目录(递归),通过 transfer-progress 事件推送进度
|
|
*/
|
|
export function CopyPath(src: string, dst: string): $CancellablePromise<void> {
|
|
return $Call.ByID(1297703531, src, dst);
|
|
}
|
|
|
|
/**
|
|
* CreateDir 创建目录
|
|
*/
|
|
export function CreateDir(path: string): $CancellablePromise<filesystem$0.FileOperationResult | null> {
|
|
return $Call.ByID(632035444, path).then(($result: any) => {
|
|
return $$createType4($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* CreateFile 创建文件
|
|
*/
|
|
export function CreateFile(path: string): $CancellablePromise<filesystem$0.FileOperationResult | null> {
|
|
return $Call.ByID(3418645411, path).then(($result: any) => {
|
|
return $$createType4($result);
|
|
});
|
|
}
|
|
|
|
export function DeleteConnectionProfile(id: number): $CancellablePromise<void> {
|
|
return $Call.ByID(2675016907, id);
|
|
}
|
|
|
|
/**
|
|
* DeletePath 删除文件或目录
|
|
*/
|
|
export function DeletePath(path: string): $CancellablePromise<filesystem$0.FileOperationResult | null> {
|
|
return $Call.ByID(1564637217, path).then(($result: any) => {
|
|
return $$createType4($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* DeletePermanently 永久删除回收站中的文件
|
|
*/
|
|
export function DeletePermanently(recyclePath: string): $CancellablePromise<void> {
|
|
return $Call.ByID(1697000327, recyclePath);
|
|
}
|
|
|
|
/**
|
|
* DetectFileTypeByContent 通过文件内容检测文件类型
|
|
*/
|
|
export function DetectFileTypeByContent(path: string): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(3067282982, path).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* DownloadUpdate 下载更新包
|
|
*/
|
|
export function DownloadUpdate(downloadURL: string): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(115027584, downloadURL).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* EmptyRecycleBin 清空回收站
|
|
*/
|
|
export function EmptyRecycleBin(): $CancellablePromise<void> {
|
|
return $Call.ByID(4176312624);
|
|
}
|
|
|
|
/**
|
|
* EnsureDrawioViewer 确保本地已缓存 drawio viewer(首次预览时下载),前端打开 .drawio 前调用。
|
|
* 通过 drawio-download-progress 事件推送下载进度。
|
|
*/
|
|
export function EnsureDrawioViewer(): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(1345697171).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* ExportPDF 导出PDF文件
|
|
*/
|
|
export function ExportPDF(content: string, title: string, fileName: string, fontSize: number, pageWidth: number, pageHeight: number): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(1770450987, content, title, fileName, fontSize, pageWidth, pageHeight).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* ExtractFileFromZip 从 zip 文件中提取单个文件内容
|
|
*/
|
|
export function ExtractFileFromZip(zipPath: string, filePath: string): $CancellablePromise<string> {
|
|
return $Call.ByID(1578144127, zipPath, filePath);
|
|
}
|
|
|
|
/**
|
|
* ExtractFileFromZipToTemp 从 zip 文件中提取单个文件到临时目录
|
|
*/
|
|
export function ExtractFileFromZipToTemp(zipPath: string, filePath: string): $CancellablePromise<string> {
|
|
return $Call.ByID(1720007904, zipPath, filePath);
|
|
}
|
|
|
|
/**
|
|
* GetAppConfig 获取应用配置
|
|
*/
|
|
export function GetAppConfig(): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(2006534548).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* GetAuditLogs 获取审计日志
|
|
*/
|
|
export function GetAuditLogs(limit: number): $CancellablePromise<{ [_ in string]?: any }[]> {
|
|
return $Call.ByID(3554903517, limit).then(($result: any) => {
|
|
return $$createType5($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* GetCPUInfo 获取 CPU 信息
|
|
*/
|
|
export function GetCPUInfo(): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(2509681007).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* GetCommonPaths 获取常用系统路径
|
|
*/
|
|
export function GetCommonPaths(): $CancellablePromise<{ [_ in string]?: string }> {
|
|
return $Call.ByID(3953343786).then(($result: any) => {
|
|
return $$createType6($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* GetCurrentVersion 获取当前版本号
|
|
*/
|
|
export function GetCurrentVersion(): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(1827245900).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* GetDiskInfo 获取磁盘信息
|
|
*/
|
|
export function GetDiskInfo(): $CancellablePromise<{ [_ in string]?: any }[]> {
|
|
return $Call.ByID(3756377758).then(($result: any) => {
|
|
return $$createType5($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* GetEnvVars 获取环境变量
|
|
*/
|
|
export function GetEnvVars(): $CancellablePromise<{ [_ in string]?: string }> {
|
|
return $Call.ByID(363814436).then(($result: any) => {
|
|
return $$createType6($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* GetFileInfo 获取文件信息
|
|
*/
|
|
export function GetFileInfo(path: string): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(2071650585, path).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* GetFileServerURL 获取本地文件服务器的URL
|
|
*/
|
|
export function GetFileServerURL(): $CancellablePromise<string> {
|
|
return $Call.ByID(4117667287);
|
|
}
|
|
|
|
export function GetLocalSystemInfo(): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(2203542363).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* GetMemoryInfo 获取内存信息
|
|
*/
|
|
export function GetMemoryInfo(): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(2096905876).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* GetRecycleBinEntries 获取回收站条目
|
|
*/
|
|
export function GetRecycleBinEntries(): $CancellablePromise<{ [_ in string]?: any }[]> {
|
|
return $Call.ByID(2312855399).then(($result: any) => {
|
|
return $$createType5($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* GetSystemInfo 获取系统信息
|
|
*/
|
|
export function GetSystemInfo(): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(1347250254).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* GetUpdateConfig 获取更新配置
|
|
*/
|
|
export function GetUpdateConfig(): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(680804904).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* GetZipFileInfo 获取 zip 文件中特定文件的信息
|
|
*/
|
|
export function GetZipFileInfo(zipPath: string, filePath: string): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(2031617692, zipPath, filePath).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* HandleHotkey 处理全局热键回调:切换 BgmBar 显示/隐藏
|
|
*/
|
|
export function HandleHotkey(): $CancellablePromise<void> {
|
|
return $Call.ByID(420101833);
|
|
}
|
|
|
|
/**
|
|
* InstallUpdate 安装更新包
|
|
*/
|
|
export function InstallUpdate(installerPath: string, autoRestart: boolean): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(2443992793, installerPath, autoRestart).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* InstallUpdateWithHash 安装更新包(带哈希验证)
|
|
*/
|
|
export function InstallUpdateWithHash(installerPath: string, autoRestart: boolean, expectedHash: string, hashType: string): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(3787276601, installerPath, autoRestart, expectedHash, hashType).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* ListDir 列出目录
|
|
*/
|
|
export function ListDir(path: string): $CancellablePromise<{ [_ in string]?: any }[]> {
|
|
return $Call.ByID(2120475736, path).then(($result: any) => {
|
|
return $$createType5($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* ListZipContents 列出 zip 文件内容
|
|
*/
|
|
export function ListZipContents(zipPath: string): $CancellablePromise<{ [_ in string]?: any }[]> {
|
|
return $Call.ByID(3013109042, zipPath).then(($result: any) => {
|
|
return $$createType5($result);
|
|
});
|
|
}
|
|
|
|
export function LoadConnectionProfiles(): $CancellablePromise<{ [_ in string]?: any }[]> {
|
|
return $Call.ByID(454364767).then(($result: any) => {
|
|
return $$createType5($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* MovePath 移动文件或目录(同盘重命名,跨盘复制后删除)
|
|
*/
|
|
export function MovePath(src: string, dst: string): $CancellablePromise<void> {
|
|
return $Call.ByID(2028899675, src, dst);
|
|
}
|
|
|
|
/**
|
|
* OpenPath 使用系统默认程序打开文件或目录
|
|
*/
|
|
export function OpenPath(path: string): $CancellablePromise<void> {
|
|
return $Call.ByID(1591734570, path);
|
|
}
|
|
|
|
/**
|
|
* OssConnect 连接 OSS 存储
|
|
*/
|
|
export function OssConnect(req: $models.OssConnectRequest): $CancellablePromise<string> {
|
|
return $Call.ByID(3667022538, req);
|
|
}
|
|
|
|
/**
|
|
* OssCreateDir OSS 创建目录
|
|
*/
|
|
export function OssCreateDir(connID: string, dirPath: string): $CancellablePromise<filesystem$0.FileOperationResult | null> {
|
|
return $Call.ByID(605668951, connID, dirPath).then(($result: any) => {
|
|
return $$createType4($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* OssCreateFile OSS 创建文件
|
|
*/
|
|
export function OssCreateFile(connID: string, filePath: string): $CancellablePromise<filesystem$0.FileOperationResult | null> {
|
|
return $Call.ByID(4148593430, connID, filePath).then(($result: any) => {
|
|
return $$createType4($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* OssDeletePath OSS 删除
|
|
*/
|
|
export function OssDeletePath(connID: string, key: string): $CancellablePromise<filesystem$0.FileOperationResult | null> {
|
|
return $Call.ByID(4285234744, connID, key).then(($result: any) => {
|
|
return $$createType4($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* OssDisconnect 断开 OSS 连接
|
|
*/
|
|
export function OssDisconnect(connID: string): $CancellablePromise<void> {
|
|
return $Call.ByID(3427288622, connID);
|
|
}
|
|
|
|
/**
|
|
* OssDownloadSiteForPreview OSS 下载 HTML 及其引用的资源到临时目录
|
|
*/
|
|
export function OssDownloadSiteForPreview(connID: string, key: string): $CancellablePromise<string> {
|
|
return $Call.ByID(1387550222, connID, key);
|
|
}
|
|
|
|
/**
|
|
* OssDownloadToTemp OSS 下载到临时文件
|
|
*/
|
|
export function OssDownloadToTemp(connID: string, key: string): $CancellablePromise<string> {
|
|
return $Call.ByID(370656471, connID, key);
|
|
}
|
|
|
|
/**
|
|
* OssDownloadToTempCached 带缓存的 OSS 下载(命中缓存直接返回本地路径)
|
|
*/
|
|
export function OssDownloadToTempCached(connID: string, key: string, fileSize: number, modTime: string): $CancellablePromise<string> {
|
|
return $Call.ByID(1312098141, connID, key, fileSize, modTime);
|
|
}
|
|
|
|
/**
|
|
* OssGetCommonPaths OSS 获取常用路径
|
|
*/
|
|
export function OssGetCommonPaths(connID: string): $CancellablePromise<{ [_ in string]?: string }> {
|
|
return $Call.ByID(3525024115, connID).then(($result: any) => {
|
|
return $$createType6($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* OssGetFileInfo OSS 获取文件信息
|
|
*/
|
|
export function OssGetFileInfo(connID: string, key: string): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(852430614, connID, key).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* OssGetSignedURL OSS 获取预签名 URL
|
|
*/
|
|
export function OssGetSignedURL(connID: string, key: string): $CancellablePromise<string> {
|
|
return $Call.ByID(1344953417, connID, key);
|
|
}
|
|
|
|
/**
|
|
* OssListDir OSS 列出目录
|
|
*/
|
|
export function OssListDir(connID: string, prefix: string): $CancellablePromise<{ [_ in string]?: any }[]> {
|
|
return $Call.ByID(3013212019, connID, prefix).then(($result: any) => {
|
|
return $$createType5($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* OssReadFile OSS 读取文件
|
|
*/
|
|
export function OssReadFile(connID: string, key: string): $CancellablePromise<string> {
|
|
return $Call.ByID(1629576606, connID, key);
|
|
}
|
|
|
|
/**
|
|
* OssRenamePath OSS 重命名
|
|
*/
|
|
export function OssRenamePath(req: $models.OssRenamePathRequest): $CancellablePromise<filesystem$0.FileOperationResult | null> {
|
|
return $Call.ByID(4218061693, req).then(($result: any) => {
|
|
return $$createType4($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* OssWriteBase64File OSS 写入 base64 编码文件
|
|
*/
|
|
export function OssWriteBase64File(connID: string, key: string, base64Content: string): $CancellablePromise<void> {
|
|
return $Call.ByID(1772140162, connID, key, base64Content);
|
|
}
|
|
|
|
/**
|
|
* OssWriteFile OSS 写入文件
|
|
*/
|
|
export function OssWriteFile(connID: string, key: string, content: string): $CancellablePromise<void> {
|
|
return $Call.ByID(39773277, connID, key, content);
|
|
}
|
|
|
|
/**
|
|
* PickDirectory 打开系统目录选择器,返回选中目录(取消时返回空串)
|
|
*/
|
|
export function PickDirectory(): $CancellablePromise<string> {
|
|
return $Call.ByID(1347829059);
|
|
}
|
|
|
|
/**
|
|
* ReadFile 读取文件
|
|
*/
|
|
export function ReadFile(path: string): $CancellablePromise<string> {
|
|
return $Call.ByID(1160596971, path);
|
|
}
|
|
|
|
/**
|
|
* RegisterGlobalHotkey 注册 Ctrl+Shift+B 全局热键(需在窗口创建后调用)
|
|
*/
|
|
export function RegisterGlobalHotkey(): $CancellablePromise<void> {
|
|
return $Call.ByID(2089930789);
|
|
}
|
|
|
|
/**
|
|
* Reload 重新加载窗口(用于菜单项)
|
|
*/
|
|
export function Reload(): $CancellablePromise<void> {
|
|
return $Call.ByID(2733532980);
|
|
}
|
|
|
|
/**
|
|
* RenamePath 重命名文件或目录
|
|
*/
|
|
export function RenamePath(req: $models.RenamePathRequest): $CancellablePromise<filesystem$0.FileOperationResult | null> {
|
|
return $Call.ByID(1959759948, req).then(($result: any) => {
|
|
return $$createType4($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* ResolveShortcut 解析快捷方式文件,返回目标路径信息
|
|
*/
|
|
export function ResolveShortcut(lnkPath: string): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(4051288361, lnkPath).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* RestoreFromRecycleBin 从回收站恢复文件
|
|
*/
|
|
export function RestoreFromRecycleBin(recyclePath: string): $CancellablePromise<void> {
|
|
return $Call.ByID(3682437655, recyclePath);
|
|
}
|
|
|
|
/**
|
|
* SaveAppConfig 保存应用配置
|
|
*/
|
|
export function SaveAppConfig(req: $models.SaveAppConfigRequest): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(1942219977, req).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* SaveBase64File 将 base64 内容解码后写入文件(用于图片等二进制数据)
|
|
*/
|
|
export function SaveBase64File(req: $models.SaveBase64FileRequest): $CancellablePromise<void> {
|
|
return $Call.ByID(1355120553, req);
|
|
}
|
|
|
|
export function SaveConnectionProfile(req: $models.SaveProfileRequest): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(3622685069, req).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* SelectPDFSaveDirectory 选择PDF保存目录
|
|
*/
|
|
export function SelectPDFSaveDirectory(): $CancellablePromise<string> {
|
|
return $Call.ByID(1403263131);
|
|
}
|
|
|
|
/**
|
|
* SetMainWindow 设置主窗口引用(由 main.go 在创建窗口后调用)
|
|
*/
|
|
export function SetMainWindow(w: application$0.WebviewWindow | null): $CancellablePromise<void> {
|
|
return $Call.ByID(843697430, w);
|
|
}
|
|
|
|
/**
|
|
* SetUpdateConfig 设置更新配置
|
|
*/
|
|
export function SetUpdateConfig(autoCheckEnabled: boolean, checkIntervalMinutes: number, checkURL: string): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(4271731092, autoCheckEnabled, checkIntervalMinutes, checkURL).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* SetWindowTitleBarColor 设置原生标题栏颜色 + 主题模式(0x00BBGGRR 格式)
|
|
*/
|
|
export function SetWindowTitleBarColor(color: number, isDark: boolean): $CancellablePromise<void> {
|
|
return $Call.ByID(1570627619, color, isDark);
|
|
}
|
|
|
|
/**
|
|
* SftpConnect 建立 SFTP 连接,返回连接标识符 connID
|
|
*/
|
|
export function SftpConnect(req: $models.SftpConnectRequest): $CancellablePromise<string> {
|
|
return $Call.ByID(2742828454, req);
|
|
}
|
|
|
|
/**
|
|
* SftpCreateDir SFTP 创建目录
|
|
*/
|
|
export function SftpCreateDir(connID: string, dirPath: string): $CancellablePromise<filesystem$0.FileOperationResult | null> {
|
|
return $Call.ByID(586600875, connID, dirPath).then(($result: any) => {
|
|
return $$createType4($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* SftpCreateFile SFTP 创建文件
|
|
*/
|
|
export function SftpCreateFile(connID: string, filePath: string): $CancellablePromise<filesystem$0.FileOperationResult | null> {
|
|
return $Call.ByID(623026146, connID, filePath).then(($result: any) => {
|
|
return $$createType4($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* SftpDeletePath SFTP 删除文件或目录
|
|
*/
|
|
export function SftpDeletePath(connID: string, filePath: string): $CancellablePromise<filesystem$0.FileOperationResult | null> {
|
|
return $Call.ByID(1833619836, connID, filePath).then(($result: any) => {
|
|
return $$createType4($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* SftpDisconnect 断开 SFTP 连接
|
|
*/
|
|
export function SftpDisconnect(connID: string): $CancellablePromise<void> {
|
|
return $Call.ByID(597628874, connID);
|
|
}
|
|
|
|
/**
|
|
* SftpDownloadSiteForPreview 下载 HTML 及其网站资源到本地临时目录
|
|
*/
|
|
export function SftpDownloadSiteForPreview(connID: string, remotePath: string): $CancellablePromise<string> {
|
|
return $Call.ByID(1591575570, connID, remotePath);
|
|
}
|
|
|
|
/**
|
|
* SftpDownloadToFile 下载远程文件/目录到用户指定目录(流式无上限,重名自动副本),返回本地落地路径
|
|
*/
|
|
export function SftpDownloadToFile(connID: string, remotePath: string, localDstDir: string): $CancellablePromise<string> {
|
|
return $Call.ByID(2935422351, connID, remotePath, localDstDir);
|
|
}
|
|
|
|
/**
|
|
* SftpDownloadToTemp 下载远程文件到本地临时目录(用于预览)
|
|
*/
|
|
export function SftpDownloadToTemp(connID: string, remotePath: string): $CancellablePromise<string> {
|
|
return $Call.ByID(1159267603, connID, remotePath);
|
|
}
|
|
|
|
/**
|
|
* SftpDownloadToTempCached 带缓存的 SFTP 下载(命中缓存直接返回本地路径)
|
|
*/
|
|
export function SftpDownloadToTempCached(connID: string, remotePath: string, fileSize: number, modTime: string): $CancellablePromise<string> {
|
|
return $Call.ByID(3935472409, connID, remotePath, fileSize, modTime);
|
|
}
|
|
|
|
/**
|
|
* SftpGetCommonPaths 获取 SFTP 远程主机常用路径
|
|
*/
|
|
export function SftpGetCommonPaths(connID: string): $CancellablePromise<{ [_ in string]?: string }> {
|
|
return $Call.ByID(2874386183, connID).then(($result: any) => {
|
|
return $$createType6($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* SftpGetFileInfo SFTP 获取文件信息
|
|
*/
|
|
export function SftpGetFileInfo(connID: string, filePath: string): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(1959840482, connID, filePath).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* SftpGetSystemInfo 获取 SFTP 远程主机系统信息(CPU/内存/磁盘)
|
|
*/
|
|
export function SftpGetSystemInfo(connID: string): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(1950143653, connID).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* SftpListDir SFTP 列出目录
|
|
*/
|
|
export function SftpListDir(connID: string, dirPath: string): $CancellablePromise<{ [_ in string]?: any }[]> {
|
|
return $Call.ByID(2061863855, connID, dirPath).then(($result: any) => {
|
|
return $$createType5($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* SftpReadFile SFTP 读取文件内容
|
|
*/
|
|
export function SftpReadFile(connID: string, filePath: string): $CancellablePromise<string> {
|
|
return $Call.ByID(3068590994, connID, filePath);
|
|
}
|
|
|
|
/**
|
|
* SftpRenamePath SFTP 重命名文件或目录
|
|
*/
|
|
export function SftpRenamePath(req: $models.SftpRenamePathRequest): $CancellablePromise<filesystem$0.FileOperationResult | null> {
|
|
return $Call.ByID(183173937, req).then(($result: any) => {
|
|
return $$createType4($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* SftpUploadFromFile 上传本地文件/目录到远程目录(流式,目录递归,重名自动副本)
|
|
*/
|
|
export function SftpUploadFromFile(connID: string, localPath: string, remoteDir: string): $CancellablePromise<void> {
|
|
return $Call.ByID(3304594335, connID, localPath, remoteDir);
|
|
}
|
|
|
|
/**
|
|
* SftpWriteBase64File SFTP 写入 base64 编码的二进制文件(粘贴图片等)
|
|
*/
|
|
export function SftpWriteBase64File(sessionID: string, filePath: string, base64Content: string): $CancellablePromise<void> {
|
|
return $Call.ByID(139141998, sessionID, filePath, base64Content);
|
|
}
|
|
|
|
/**
|
|
* SftpWriteFile SFTP 写入文件
|
|
*/
|
|
export function SftpWriteFile(req: $models.SftpWriteFileRequest): $CancellablePromise<void> {
|
|
return $Call.ByID(2401472593, req);
|
|
}
|
|
|
|
/**
|
|
* UnwatchFile 停止监听文件变化
|
|
*/
|
|
export function UnwatchFile(): $CancellablePromise<void> {
|
|
return $Call.ByID(3006906623);
|
|
}
|
|
|
|
/**
|
|
* VerifyUpdateFile 验证更新文件哈希值
|
|
*/
|
|
export function VerifyUpdateFile(filePath: string, expectedHash: string, hashType: string): $CancellablePromise<{ [_ in string]?: any }> {
|
|
return $Call.ByID(2181909867, filePath, expectedHash, hashType).then(($result: any) => {
|
|
return $$createType2($result);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* WatchFile 开始监听指定文件的变化,变化时发送 file-changed 事件
|
|
*/
|
|
export function WatchFile(path: string): $CancellablePromise<void> {
|
|
return $Call.ByID(325055910, path);
|
|
}
|
|
|
|
/**
|
|
* WindowClose 关闭窗口
|
|
*/
|
|
export function WindowClose(): $CancellablePromise<void> {
|
|
return $Call.ByID(1474073651);
|
|
}
|
|
|
|
/**
|
|
* WindowIsMaximized 检查窗口是否最大化
|
|
*/
|
|
export function WindowIsMaximized(): $CancellablePromise<boolean> {
|
|
return $Call.ByID(854232017);
|
|
}
|
|
|
|
/**
|
|
* WindowMaximize 最大化/还原窗口
|
|
*/
|
|
export function WindowMaximize(): $CancellablePromise<void> {
|
|
return $Call.ByID(2739663967);
|
|
}
|
|
|
|
/**
|
|
* WindowMinimize 最小化窗口
|
|
*/
|
|
export function WindowMinimize(): $CancellablePromise<void> {
|
|
return $Call.ByID(1846147565);
|
|
}
|
|
|
|
/**
|
|
* WindowToggleAlwaysOnTop 切换窗口置顶
|
|
*/
|
|
export function WindowToggleAlwaysOnTop(): $CancellablePromise<boolean> {
|
|
return $Call.ByID(3391208916);
|
|
}
|
|
|
|
/**
|
|
* WriteFile 写入文件
|
|
*/
|
|
export function WriteFile(req: $models.WriteFileRequest): $CancellablePromise<void> {
|
|
return $Call.ByID(3562730546, req);
|
|
}
|
|
|
|
// Private type creation functions
|
|
const $$createType0 = $models.BgmPlaylistItem.createFrom;
|
|
const $$createType1 = $Create.Array($$createType0);
|
|
const $$createType2 = $Create.Map($Create.Any, $Create.Any);
|
|
const $$createType3 = filesystem$0.FileOperationResult.createFrom;
|
|
const $$createType4 = $Create.Nullable($$createType3);
|
|
const $$createType5 = $Create.Array($$createType2);
|
|
const $$createType6 = $Create.Map($Create.Any, $Create.Any);
|