2022-08-24 11:10:50 +08:00
|
|
|
package dto
|
|
|
|
|
2022-08-25 17:54:52 +08:00
|
|
|
import (
|
|
|
|
"github.com/1Panel-dev/1Panel/utils/files"
|
|
|
|
)
|
2022-08-24 11:10:50 +08:00
|
|
|
|
|
|
|
type FileOption struct {
|
|
|
|
files.FileOption
|
|
|
|
}
|
|
|
|
|
|
|
|
type FileInfo struct {
|
|
|
|
files.FileInfo
|
|
|
|
}
|
2022-08-24 17:34:21 +08:00
|
|
|
|
|
|
|
type FileTree struct {
|
2022-08-24 17:58:58 +08:00
|
|
|
ID string `json:"id"`
|
2022-08-24 17:34:21 +08:00
|
|
|
Name string `json:"name"`
|
|
|
|
Path string `json:"path"`
|
|
|
|
Children []FileTree `json:"children"`
|
|
|
|
}
|
2022-08-25 17:54:52 +08:00
|
|
|
|
|
|
|
type FileCreate struct {
|
2022-08-31 16:00:51 +08:00
|
|
|
Path string
|
|
|
|
Content string
|
|
|
|
IsDir bool
|
|
|
|
Mode int64
|
|
|
|
IsLink bool
|
|
|
|
IsSymlink bool
|
|
|
|
LinkPath string
|
2022-08-25 17:54:52 +08:00
|
|
|
}
|
2022-08-25 18:48:03 +08:00
|
|
|
|
|
|
|
type FileDelete struct {
|
|
|
|
Path string
|
|
|
|
IsDir bool
|
|
|
|
}
|
2022-08-30 17:59:59 +08:00
|
|
|
|
|
|
|
type FileCompress struct {
|
|
|
|
Files []string
|
|
|
|
Dst string
|
|
|
|
Type string
|
|
|
|
Name string
|
|
|
|
Replace bool
|
|
|
|
}
|
2022-08-31 13:59:02 +08:00
|
|
|
|
|
|
|
type FileDeCompress struct {
|
|
|
|
Dst string
|
|
|
|
Type string
|
|
|
|
Path string
|
|
|
|
}
|
2022-09-01 19:02:33 +08:00
|
|
|
|
|
|
|
type FileEdit struct {
|
|
|
|
Path string
|
|
|
|
Content string
|
|
|
|
}
|
2022-09-03 22:22:40 +08:00
|
|
|
|
|
|
|
type FileRename struct {
|
|
|
|
OldName string
|
|
|
|
NewName string
|
|
|
|
}
|
2022-09-05 16:25:26 +08:00
|
|
|
|
2022-09-06 17:48:49 +08:00
|
|
|
type FileWget struct {
|
2022-09-05 16:25:26 +08:00
|
|
|
Url string `json:"url" validate:"required"`
|
|
|
|
Path string `json:"path" validate:"required"`
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
}
|
2022-09-06 10:35:35 +08:00
|
|
|
|
|
|
|
type FileMove struct {
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
OldPaths []string `json:"oldPaths" validate:"required"`
|
|
|
|
NewPath string `json:"newPath" validate:"required"`
|
|
|
|
}
|
2022-09-06 17:48:49 +08:00
|
|
|
|
|
|
|
type FileDownload struct {
|
|
|
|
Paths []string `json:"paths" validate:"required"`
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
}
|
2022-09-09 18:10:41 +08:00
|
|
|
|
|
|
|
type DirSizeReq struct {
|
|
|
|
Path string `json:"path" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DirSizeRes struct {
|
|
|
|
Size float64 `json:"size" validate:"required"`
|
|
|
|
}
|