Documentation ¶
Overview ¶
Package virtualfs implements an in-memory abstraction of fs.Directory and fs.StreamingFile.
Index ¶
- func NewStaticDirectory(name string, entries []fs.Entry) fs.Directory
- func NewStreamingDirectory(name string, iter fs.DirectoryIterator) fs.Directory
- func StreamingFileFromReader(name string, reader io.ReadCloser) fs.StreamingFile
- func StreamingFileWithModTimeFromReader(name string, t time.Time, reader io.ReadCloser) fs.StreamingFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStaticDirectory ¶
NewStaticDirectory returns a virtual static directory.
func NewStreamingDirectory ¶ added in v0.11.0
func NewStreamingDirectory( name string, iter fs.DirectoryIterator, ) fs.Directory
NewStreamingDirectory returns a directory that will invoke the provided iterator on Iterate().
func StreamingFileFromReader ¶
func StreamingFileFromReader(name string, reader io.ReadCloser) fs.StreamingFile
StreamingFileFromReader returns a streaming file with given name and reader.
func StreamingFileWithModTimeFromReader ¶ added in v0.12.0
func StreamingFileWithModTimeFromReader(name string, t time.Time, reader io.ReadCloser) fs.StreamingFile
StreamingFileWithModTimeFromReader returns a streaming file with given name, modified time, and reader.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.