package
Version:
v2.7.12
Opens a new window with list of versions in this module.
Published: Feb 19, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 13
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
¶
-
func DirSize(fs v1.FS, path string) (int64, error)
-
func Exists(fs v1.FS, path string) (bool, error)
-
func IsDir(fs v1.FS, path string) (bool, error)
-
func MkdirAll(fs v1.FS, name string, mode os.FileMode) (err error)
-
func TempDir(fs v1.FS, dir, prefix string) (name string, err error)
-
func TempFile(fs v1.FS, dir, pattern string) (f *os.File, err error)
-
func WalkDirFs(fs v1.FS, root string, fn fs.WalkDirFunc) error
DirSize returns the accumulated size of all files in folder
Check if a file or directory exists.
IsDir check if the path is a dir
MkdirAll directory and all parents if not existing
TempDir creates a temp dir in the virtual fs
Took from afero.FS code and adapted
TempFile creates a temp file in the virtual fs
Took from afero.FS code and adapted
WalkDirFs is the same as filepath.WalkDir but accepts a v1.Fs so it can be run on any v1.Fs type
Source Files
¶
Click to show internal directories.
Click to hide internal directories.