Documentation ¶
Index ¶
- func DirExist(name string, fs vfs.FS) (result bool, err error)
- func Mkdir(dir string, fs vfs.FS) error
- func MkdirAll(dir string, fs vfs.FS) error
- func MustWrite(w io.Writer, data []byte)
- func SyncDir(dir string, fs vfs.FS) (err error)
- func TempDir(dir, pattern string, fs vfs.FS) (name string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustWrite ¶
MustWrite writes the specified data to the input writer. It will panic if there is any error.
func TempDir ¶
TempDir creates a new temporary directory in the directory dir. The directory name is generated by taking pattern and applying a random string to the end. If pattern includes a "*", the random string replaces the last "*". TempDir returns the name of the new directory. If dir is the empty string, TempDir uses the default directory for temporary files (see os.TempDir). Multiple programs calling TempDir simultaneously will not choose the same directory. It is the caller's responsibility to remove the directory when no longer needed.
Types ¶
This section is empty.