Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FsWithSys ¶
func From ¶
From creates a new FS from an fs.FS.
For paths like `c:/foo/bar`, fsys will be used as though it's rooted at `/` and the path is `/c:/foo/bar`.
If the provided fs.FS implements RealpathFS, it will be used to implement the Realpath method. If the provided fs.FS implements WritableFS, it will be used to implement the WriteFile method.
From does not actually handle case-insensitivity; ensure the passed in fs.FS respects case-insensitive file names if needed. Consider using [vfstest.FromMap] for testing.
type WritableFS ¶
type WritableFS interface { fs.FS WriteFile(path string, data []byte, perm fs.FileMode) error MkdirAll(path string, perm fs.FileMode) error // Removes `path` and all its contents. Will return the first error it encounters. Remove(path string) error Chtimes(path string, aTime time.Time, mTime time.Time) error }
Click to show internal directories.
Click to hide internal directories.