webcad-ue4-api/types/DatabaseServices/FileServer.d.ts

48 lines
1.6 KiB
TypeScript
Raw Normal View History

2021-01-28 10:17:21 +08:00
import { Singleton } from "../Common/Singleton";
import { IDirectoryProps } from "../UI/Components/SourceManage/CommonPanel";
export interface IFileInfo {
file_id?: string;
dir_id?: string;
name?: string;
logo?: string;
file?: string;
2022-08-01 11:31:59 +08:00
props?: string;
2021-01-28 10:17:21 +08:00
zip_type?: "gzip";
update_date?: string;
code?: string;
2022-02-16 11:15:31 +08:00
path?: string;
pathNum?: number[];
2021-01-28 10:17:21 +08:00
}
/**
* File server
* CAD的文件服务,CRUD操作
*/
export declare class FileServer extends Singleton {
currentFileInfo: {
name: string;
dir: IDirectoryProps;
};
m_CurFileId: string;
CurrentFileMd5: string;
2022-02-16 11:15:31 +08:00
_CurrentFilePath: string;
2021-01-28 10:17:21 +08:00
constructor();
AddNewFile(): Promise<boolean>;
GetFileMD5(fid: string): Promise<string | undefined>;
2022-02-16 11:15:31 +08:00
OpenFile(fid: string, file?: string): Promise<boolean>;
2021-01-28 10:17:21 +08:00
ReadFileList(): Promise<IFileInfo[]>;
2022-06-30 15:31:16 +08:00
/**
* ,md5等于缓存,,
* @param fid id
* @param [code] md5值
* @returns
*/
2022-02-16 11:15:31 +08:00
GetFileInfo(fid: string, code?: string): Promise<IFileInfo>;
2021-01-28 10:17:21 +08:00
CacheFileInfo(fid: string, info: IFileInfo): Promise<void>;
2022-02-16 11:15:31 +08:00
UploadFile(fileInfo: IFileInfo, rawFile?: string): Promise<import("../Common/Request").IResponseData>;
UpdateFile(fileInfo: IFileInfo, rawFile?: string): Promise<import("../Common/Request").IResponseData>;
Download(fid: string): Promise<void>;
2022-08-01 11:31:59 +08:00
DownloadTemplate(fid: string): Promise<void>;
2021-01-28 10:17:21 +08:00
private SaveCurrentFileInfo;
Clear(): void;
}
//# sourceMappingURL=FileServer.d.ts.map