Documentation
¶
Overview ¶
Package files contains utility functions to make working with files easier and more straight forward acknowledgements
- github.com/prometheus/prometheus/tsdb/fileutil
- github.com/VictoriaMetrics/VictoriaMetrics/lib/fs
Index ¶
- func CopyDir(src, dest string) error
- func CopyFile(src, dest string) error
- func DirSize(dir string) (int64, error)
- func FileSize(path string) (int64, error)
- func HardLinkFiles(src, dest string) error
- func IsDirOrSymlink(fi os.FileInfo) bool
- func IsTemporaryFileName(fn string) bool
- func MkdirAll(path string) error
- func OpenPath(path string) (*os.File, os.FileInfo, error)
- func PathExist(path string) bool
- func ReadDirFiles(root, pattern string) ([]string, error)
- func Rename(from, to string) error
- func SafeMkdirAll(path string) error
- func SafeOpenPath(path string) (*os.File, os.FileInfo, error)
- func SymlinkRelative(srcPath, dstPath string) error
- func SyncPath(path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HardLinkFiles ¶ added in v0.0.2
HardLinkFiles makes hard links for all the files from src in dest.
func IsDirOrSymlink ¶ added in v0.0.2
IsDirOrSymlink returns true if fi is directory or symlink.
func IsTemporaryFileName ¶ added in v0.0.2
IsTemporaryFileName returns true if fn matches temporary file name pattern
func ReadDirFiles ¶ added in v0.0.2
ReadDirFiles searches a root directory recursively for files with a pattern
func SafeMkdirAll ¶ added in v0.0.2
SafeMkdirAll creates directory tree in case it doesn't exist if it exists, it would fail
func SafeOpenPath ¶ added in v0.0.2
SafeOpenPath removes empty files after opening empty files are most often result of a failed io
func SymlinkRelative ¶ added in v0.0.2
SymlinkRelative creates relative symlink for srcPath in dstPath.
Types ¶
This section is empty.