Documentation ¶
Index ¶
- type File
- type Folder
- func (f *Folder) AddFile(name string, contentType string) error
- func (f *Folder) AddMount(name, path string) error
- func (f *Folder) AddTemplate(name string) error
- func (f *Folder) FindFolder(name string) (tree.Tree, error)
- func (f *Folder) Format(maxDepth int) string
- func (f *Folder) IsMount() bool
- func (f *Folder) Len() int
- func (f Folder) List(maxDepth int) []string
- func (f *Folder) SetName(name string)
- func (f *Folder) SetRoot(on bool)
- func (f *Folder) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Folder ¶
type Folder struct { Name string // Name is the displayed name of this folder Path string // Path is only used for mounts, it's the on-disk path Root bool // Root is used for the root node to remove any prefix HasTpl bool Folders map[string]*Folder // the sub-entries, prevents having files and folder w/ same name Files map[string]*File }
Folder is intermediate tree node
func (*Folder) AddTemplate ¶
AddTemplate adds a new template
func (*Folder) FindFolder ¶
FindFolder returns a sub-tree or nil, if the subtree does not exist
func (*Folder) Len ¶
Len returns the number of entries in this folder and all subfolder including this folder itself
Click to show internal directories.
Click to hide internal directories.