Documentation
¶
Overview ¶
Package wittyintegratedfilebrowser lists a computer's drives, folders and files for a folder browser shown in a web page, so folders can be chosen from another device than the one holding them. It only reads: nothing is created, renamed or deleted.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotFound: the path does not exist (or cannot be seen). ErrNotFound = errors.New("folder not found") // ErrDenied: the folder exists but cannot be opened. ErrDenied = errors.New("not allowed to open this folder") )
var ManifestJSON []byte
ManifestJSON is this module's manifest (docs/MODULES.md, "The manifest").
Functions ¶
func DiscFolder ¶
DiscFolder says whether a folder holds a disc's structure: "dvd" for a VIDEO_TS folder (or one holding it), "bluray" for BDMV, else "".
Types ¶
type Entry ¶
type Entry struct {
Name string `json:"name"`
Path string `json:"path"`
Dir bool `json:"dir"`
Kind string `json:"kind,omitempty"` // files: what Options.Kind says (video, audio, book, disc, subtitle, image, other)
Disc string `json:"disc,omitempty"` // folders holding a DVD (VIDEO_TS) or Blu-ray (BDMV): "dvd" or "bluray"
Size int64 `json:"size,omitempty"`
Modified int64 `json:"modified,omitempty"` // Unix seconds
Hidden bool `json:"hidden,omitempty"`
}
Entry is one folder or file in a listing.
type Listing ¶
type Listing struct {
Path string `json:"path"`
Parent *string `json:"parent"` // nil at a drive's root
Sep string `json:"sep"`
Entries []Entry `json:"entries"`
Counts map[string]int `json:"counts"` // "folder" and each file kind
Truncated bool `json:"truncated"`
}
Listing is a folder's contents.
type Options ¶
type Options struct {
ShowHidden bool // include dot-files and system folders
MaxEntries int // 0 = 3000
Kind func(name string) string // classifies files; nil = FileKind
}
Options change a listing.
type Place ¶
type Place struct {
Name string `json:"name"`
Path string `json:"path"`
Group string `json:"group"` // drives, folders, or the host's own group name
Label string `json:"label,omitempty"`
Free uint64 `json:"free,omitempty"`
Total uint64 `json:"total,omitempty"`
}
Place is somewhere to start browsing: a drive, a usual folder, or one the host adds (such as folders already in use).
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
wittyintegratedfilebrowser-module
command
Command wittyintegratedfilebrowser-module is WittyIntegratedFileBrowser as a helper process, so a new version can reach a server without a new server.
|
Command wittyintegratedfilebrowser-module is WittyIntegratedFileBrowser as a helper process, so a new version can reach a server without a new server. |
