Documentation
¶
Overview ¶
Package diskfs serves the Disk tab's file routes (/api/fs/*): the roots a deployment names, a listing, the favorite folders, a download, a new folder and resumable uploads. Everything is relative to a root; a path never leaves its root, neither by "..", nor by an absolute path, nor by a symbolic link.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Roots []Root
// StateDir keeps the favorites and the unfinished uploads (the latter under disk-uploads/).
StateDir string
// ChunkSize is how many bytes one PUT of an upload may carry; 0 is 8 MiB.
ChunkSize int64
}
Config is what a deployment sets: the roots, and where the server keeps its own state.
type Root ¶
Root is one folder of the machine the Disk tab may open.
func ParseRoots ¶
ParseRoots reads "Label=/abs/path;Other=/abs/other". The id of a root is its label as a slug.