Documentation ¶
Index ¶
- Constants
- func DirExists(dirname string) (bool, error)
- func DirSize(currentPath string, info os.FileInfo) (int64, error)
- func FileExists(filename string) (bool, error)
- func FileFallocate(filepath string, size int64, mode os.FileMode, force bool) error
- func FsStatFromPath(path string) (*disk.UsageStat, error)
- func IsSymlink(path string) bool
- func LsDirs(dir string) ([]string, error)
- func LsNames(dir string) ([]string, error)
- func LsNamesAbs(dir string) ([]string, error)
- func MountBind(src, tgt string) error
- func MountBindAll(dirs ...string) error
- func ResolveSymlinks(paths []string) ([]string, error)
- func UmountAll(mpr string) error
- func Unmount(mountpoint string) error
Constants ¶
const Version = "v0.4.1"
Version exposes the current package version.
Variables ¶
This section is empty.
Functions ¶
func DirExists ¶
DirExists checks whether dirname exists and is a dir (it returns (somehwat peculiar?) true, error if exists but is not a dir)
func DirSize ¶
DirSize returns the total size in bytes of the dir contents (recursively scanned) Adapted from https://ispycode.com/Blog/golang/2017-01/DU-estimate-file-space-usage work-alike with linux/unix du util
func FileExists ¶
FileExists checks whether filename exists and is a (regular) file (it returns (somehwat peculiar?) true, error if exists but is a dir)
func FileFallocate ¶
func FsStatFromPath ¶
we can use github.com/minio/minio/pkg/disk or github.com/shirou/gopsutil/disk, the latter may be useful for much more so we go with that
func LsNames ¶
LsNames returns a string slice of all (file) names found in the dir argument, excluding "." and ".."
func LsNamesAbs ¶
LsNames returns a string slice with the absolute path of all (file) names found in the dir argument, excluding "." and ".."
func MountBind ¶
MountBind bind mounts src on target The calling process needs to run under root for this!
func MountBindAll ¶
MountBindAll bind mounts the source dirs in args[:nargs-2] in args[nargs-1], creating mount points based on the source dir names as needed
func ResolveSymlinks ¶
ResolveSymlinks takes a list of paths and returns the resolved symlinks
Types ¶
This section is empty.