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

35 lines
1.1 KiB
TypeScript
Raw Normal View History

2020-09-24 11:04:12 +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;
zip_type?: "gzip";
update_date?: string;
}
/**
* File server
* CAD的文件服务,CRUD操作
*/
export declare class FileServer extends Singleton {
currentFileInfo: {
name: string;
dir: IDirectoryProps;
};
m_CurFileId: string;
constructor();
AddNewFile(): Promise<boolean>;
OpenFile(fid: string): Promise<boolean>;
ReadFileList(): Promise<IFileInfo[]>;
GetFileInfo(fid: string): Promise<{
name: string;
file?: string;
}>;
UploadFile(fileInfo: IFileInfo): Promise<import("../Common/Request").IResponseData>;
UpdateFile(fileInfo: IFileInfo): Promise<import("../Common/Request").IResponseData>;
Download(fid: string): Promise<void>;
private SaveCurrentFileInfo;
}
//# sourceMappingURL=FileServer.d.ts.map