feat: move or copy dialog with folder suggestions and a rule for what is already there

This commit is contained in:
redtea committed 2026-10-14 20:25:59 +03:00
1 parent 89d5bfd3ab
commit e983fc179a
5 files changed
+337 -6

No files matched your search

+12
View File
@@ -87,6 +87,7 @@ const (
TaskFSDownload = "fs.download" // read a whole file (larger cap) for browser download
TaskFSStat = "fs.stat" // a file's properties: type, size, mode, owner
TaskFSChmod = "fs.chmod" // change mode and owner, of a folder's contents too
TaskFSCopy = "fs.copy" // copy or move, with a rule for what is already there
TaskFSPut = "fs.put" // write a file the browser sends in pieces
TaskFSSend = "fs.send" // send a file to the browser in pieces
@@ -178,6 +179,17 @@ type FSChmodArgs struct {
Only string `json:"only,omitempty"`
}
// FSCopyArgs are the arguments of TaskFSCopy: Src goes to Dst (the full new
// path), copied or, with Move, moved. Conflict says what to do when Dst is
// already there: "error" (the default) stops, "replace" puts Src in its place,
// "skip" keeps it. Folders on both sides are merged under replace and skip.
type FSCopyArgs struct {
Src string `json:"src"`
Dst string `json:"dst"`
Move bool `json:"move,omitempty"`
Conflict string `json:"conflict,omitempty"`
}
// FSEntry is one directory entry.
type FSEntry struct {
Name string `json:"name"`