Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileData ¶
type FileData struct {
Username string `json:"username"`
Groupname string `json:"groupname"`
Paths []string `json:"paths,omitempty"` // For upload
Files []FileInfo `json:"files,omitempty"` // For batch download
Path string `json:"path,omitempty"` // Single file path
Content []byte `json:"content,omitempty"` // File content for download
Type string `json:"type,omitempty"` // File type
AllowOverwrite bool `json:"allow_overwrite,omitempty"`
AllowUnzip bool `json:"allow_unzip,omitempty"`
URL string `json:"url,omitempty"`
}
FileData contains data for file operations
type FileHandler ¶
type FileHandler struct {
*common.BaseHandler
// contains filtered or unexported fields
}
FileHandler handles file transfer commands
func NewFileHandler ¶
func NewFileHandler(cmdExecutor common.CommandExecutor, apiSession common.APISession) *FileHandler
NewFileHandler creates a new file handler
func (*FileHandler) Execute ¶
func (h *FileHandler) Execute(ctx context.Context, cmd string, args *common.CommandArgs) (int, string, error)
Execute runs the file transfer command
func (*FileHandler) Validate ¶
func (h *FileHandler) Validate(cmd string, args *common.CommandArgs) error
Validate checks if the arguments are valid for the command
type FileInfo ¶
type FileInfo struct {
Username string `json:"username"`
Groupname string `json:"groupname"`
Path string `json:"path"`
Type string `json:"type"`
Content []byte `json:"content"`
AllowOverwrite bool `json:"allow_overwrite"`
AllowUnzip bool `json:"allow_unzip"`
URL string `json:"url"`
}
FileInfo contains information about a file for batch operations
Click to show internal directories.
Click to hide internal directories.