Documentation ¶
Index ¶
- func DirInfo(name string, modTime time.Time) fs.FileInfo
- func FileInfo(name string, size int64, mode fs.FileMode, modTime time.Time, ...) fs.FileInfo
- func FileInfoDirEntry(fi fs.FileInfo) fs.DirEntry
- func ValidPath(name string) bool
- type ContentTypeFileInfo
- type WithContexter
- type WithHTTPClienter
- type WithHeaderer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirInfo ¶
DirInfo creates a fs.FileInfo for a directory with the given name. Use FileInfo to set other values.
func FileInfo ¶
func FileInfo(name string, size int64, mode fs.FileMode, modTime time.Time, contentType string) fs.FileInfo
FileInfo creates a static fs.FileInfo with the given properties. The result is also a fs.DirEntry and can be safely cast.
func FileInfoDirEntry ¶
FileInfoDirEntry adapts a fs.FileInfo into a fs.DirEntry. If it doesn't already implement fs.DirEntry, it will be wrapped to always return the same fs.FileInfo.
Types ¶
type ContentTypeFileInfo ¶
ContentTypeFileInfo is an fs.FileInfo that can also report its content type
type WithContexter ¶
WithContexter is an fs.FS that can be configured with a custom context
type WithHTTPClienter ¶
WithHTTPClienter is an fs.FS that can be configured with a custom http.Client
Directories ¶
Path | Synopsis |
---|---|
Package env contains functions that retrieve data from the environment
|
Package env contains functions that retrieve data from the environment |
Click to show internal directories.
Click to hide internal directories.