Documentation
¶
Index ¶
- type EFS
- type File
- func (f *File) Close() error
- func (f *File) IsDir() bool
- func (f *File) ModTime() time.Time
- func (f *File) Mode() os.FileMode
- func (f *File) Name() string
- func (f *File) Readdir(count int) ([]os.FileInfo, error)
- func (f *File) Size() int64
- func (f *File) Stat() (os.FileInfo, error)
- func (f *File) Sys() interface{}
- type FileSystem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EFS ¶
type EFS struct {
// contains filtered or unexported fields
}
EFS holds an embedded filesystem.
func (*EFS) FileSystem ¶
func (efs *EFS) FileSystem(localRoot string) FileSystem
FileSystem returns either the embedded filesystem or a live filesystem rooted at localRoot if localRoot isn't an empty string and points to a directory.
type File ¶
File holds the data for an embedded file.
func (*File) Close ¶
Close the file. Does nothing and always returns nil. Implements the io.Closer interface.
func (*File) IsDir ¶
IsDir returns true if this represents a directory. Implements the os.FileInfo interface.
func (*File) ModTime ¶
ModTime returns the file modification time. Implements the os.FileInfo interface.
func (*File) Readdir ¶
Readdir reads a directory and returns information about its contents. Implements the http.File interface.
func (*File) Size ¶
Size returns the size of the file in bytes. Implements the os.FileInfo interface.
type FileSystem ¶
type FileSystem interface { http.FileSystem IsLive() bool ContentAsBytes(path string) ([]byte, bool) MustContentAsBytes(path string) []byte ContentAsString(path string) (string, bool) MustContentAsString(path string) string }
FileSystem defines the methods available for a live or embedded filesystem.