Archived
2
0

listing of files on connect

This commit is contained in:
William Harrell
2022-11-02 22:20:32 -04:00
parent 1505abb703
commit 70e84c5840
12 changed files with 160 additions and 26 deletions

View File

@ -34,6 +34,14 @@ const (
CHAT_EMOTE = "chat/emote"
)
const (
FILETRANSFER_ENABLE = "filetransfer/enable"
FILETRANSFER_DISABLE = "filetransfer/disable"
FILETRANSFER_UNPRIVENABLE = "filetransfer/unprivenable"
FILETRANSFER_UNPRIVDISABLE = "filetransfer/unprivdisable"
FILETRANSFER_LIST = "filetransfer/list"
)
const (
SCREEN_CONFIGURATIONS = "screen/configurations"
SCREEN_RESOLUTION = "screen/resolution"

View File

@ -106,6 +106,17 @@ type EmoteSend struct {
Emote string `json:"emote"`
}
type FileTransferTarget struct {
Event string `json:"event"`
ID string `json:"id"`
}
type FileList struct {
Event string `json:"event"`
Cwd string `json:"cwd"`
Files []types.FileListItem `json:"files"`
}
type Admin struct {
Event string `json:"event"`
ID string `json:"id"`

View File

@ -37,3 +37,8 @@ type WebSocketHandler interface {
CanTransferFiles(password string) (bool, error)
MakeFilePath(filename string) string
}
type FileListItem struct {
Filename string `json:"name"`
Type string `json:"type"`
}