1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-21 09:19:16 +08:00

102 lines
2.0 KiB
Go
Raw Normal View History

2022-08-19 16:02:58 +08:00
import { CommonModel } from '.';
export namespace File {
export interface File extends CommonModel {
2022-08-24 11:10:50 +08:00
path: string;
2022-08-19 16:02:58 +08:00
name: string;
user: string;
group: string;
2022-08-24 11:10:50 +08:00
content: string;
size: number;
2022-08-19 16:02:58 +08:00
isDir: boolean;
2022-08-24 11:10:50 +08:00
isSymlink: boolean;
linkPath: boolean;
2022-08-24 11:10:50 +08:00
type: string;
updateTime: string;
modTime: string;
mode: number;
2022-08-30 17:59:59 +08:00
mimeType: string;
dirSize: number;
2022-08-24 11:10:50 +08:00
items: File[];
}
export interface ReqFile {
2022-08-19 16:02:58 +08:00
path: string;
2022-08-24 11:10:50 +08:00
search?: string;
expand: boolean;
2022-09-06 10:35:35 +08:00
dir?: boolean;
2022-09-09 11:20:02 +08:00
showHidden?: boolean;
2022-08-19 16:02:58 +08:00
}
2022-08-24 17:34:21 +08:00
export interface FileTree {
id: string;
2022-08-24 17:34:21 +08:00
name: string;
2022-08-26 17:35:14 +08:00
isDir: boolean;
2022-08-24 17:34:21 +08:00
path: string;
children?: FileTree[];
}
2022-08-25 17:54:52 +08:00
export interface FileCreate {
path: string;
2022-08-26 17:35:14 +08:00
isDir: boolean;
2022-08-25 17:54:52 +08:00
mode: number;
isLink?: boolean;
isSymlink?: boolean;
linkPath?: boolean;
2022-08-25 17:54:52 +08:00
}
2022-08-25 18:48:03 +08:00
export interface FileDelete {
path: string;
2022-08-26 17:35:14 +08:00
isDir: boolean;
2022-08-25 18:48:03 +08:00
}
2022-08-30 17:59:59 +08:00
export interface FileCompress {
files: string[];
type: string;
dst: string;
name: string;
replace: boolean;
}
2022-08-31 13:59:02 +08:00
export interface FileDeCompress {
path: string;
dst: string;
type: string;
}
2022-09-01 19:02:33 +08:00
export interface FileEdit {
path: string;
content: string;
}
2022-09-03 22:22:40 +08:00
export interface FileRename {
oldName: string;
newName: string;
}
2022-09-05 16:25:26 +08:00
2022-09-06 17:48:49 +08:00
export interface FileWget {
2022-09-05 16:25:26 +08:00
path: string;
name: string;
url: string;
}
2022-09-06 10:35:35 +08:00
export interface FileMove {
oldPaths: string[];
newPath: string;
type: string;
}
2022-09-06 17:48:49 +08:00
export interface FileDownload {
paths: string[];
name: string;
url: string;
}
export interface DirSizeReq {
path: string;
}
export interface DirSizeRes {
size: number;
}
2022-08-19 16:02:58 +08:00
}