Versions in this module Expand all Collapse all v1 v1.0.1 Jan 10, 2021 v1.0.0 Jan 10, 2021 Changes in this version + const F_OFD_GETLK — linux/amd64 + const F_OFD_SETLK — linux/amd64 + const F_OFD_SETLKW — linux/amd64 + const LOCKFILE_EXCLUSIVE_LOCK — windows/amd64 + const LOCKFILE_FAIL_IMMEDIATELY — windows/amd64 + const PrivateDirMode + const PrivateFileMode + var ErrLocked = errors.New("fileutil: file already locked") + func CreateDirAll(dir string) error + func Exist(name string) bool + func Fdatasync(f *os.File) error + func Fsync(f *os.File) error + func IsDirWriteable(dir string) error + func OpenDir(path string) (*os.File, error) + func Preallocate(f *os.File, sizeInBytes int64, extendFile bool) error + func PurgeFile(dirname string, suffix string, max uint, interval time.Duration, ...) <-chan error + func ReadDir(dirpath string) ([]string, error) + func TouchDirAll(dir string) error + func ZeroToEnd(f *os.File) error + type LockedFile struct + func LockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) + func TryLockFile(path string, flag int, perm os.FileMode) (*LockedFile, error)