Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶
Loader is a function that loads file content. If the context id done this function should return an error.
type Opener ¶
type Opener interface { // Open returns a file/dir. Open() http.File // Stat returns information about the file/dir. Stat() (os.FileInfo, error) // Readdir retruns list of file info contained in a directory. // Preforming Readdir on a file returns nil, nil. Readdir(count int) ([]os.FileInfo, error) }
Opener is an interface for a directory or a file provider.
type Tree ¶
Tree maps a file path to a file provider. It implements http.FileSystem.
func (Tree) AddDir ¶
AddDir adds a directory to a tree. It also adds recursively all the parent directories.
func (Tree) AddFile ¶
AddFile adds a file to a tree. It also adds recursively all the parent directories.
func (Tree) AddFileContent ¶ added in v0.1.0
AddFileContent adds a file that its content is already available.
Click to show internal directories.
Click to hide internal directories.