Documentation ¶
Overview ¶
Package osconv defines a function which runs through a giving directory and returns a Filesystem in return. Helps in converting filesystem files into a embeddable and usable format.
Index ¶
- func ConvertDataFile(file string) (filesystem.FileWriter, error)
- func ConvertDir(dir string, deferData bool, filterFn func(string) bool) (filesystem.MemoryFileSystem, error)
- func ConvertFile(file string) filesystem.FileWriter
- func WalkDir(dir string, callback DirWalker) error
- type DirWalker
- type FromFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertDataFile ¶
func ConvertDataFile(file string) (filesystem.FileWriter, error)
ConvertDataFile returns a filesystem.FileWriter structure for the giving file path with the data pulled in directly.
func ConvertDir ¶
func ConvertDir(dir string, deferData bool, filterFn func(string) bool) (filesystem.MemoryFileSystem, error)
ConvertDir returns a filesystem.DirWriter structure for the giving directory path and its children. It runs through the directory and skips all paths that passes the filter functions only processing paths that do not. If `deferData` is set to true, it returns structures whoes files do not load their data into memory but wait till their `WriteTo` methods are called to improve memory usage.
func ConvertFile ¶
func ConvertFile(file string) filesystem.FileWriter
ConvertFile returns a filesystem.FileWriter structure for the giving file path with its data pull in later during its WriteTo call.