Versions in this module Expand all Collapse all v1 v1.0.1 Aug 16, 2019 v1.0.0 Aug 16, 2019 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(lg *zap.Logger, dirname string, suffix string, max uint, ...) <-chan error + func ReadDir(d string, opts ...ReadDirOption) ([]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) + type ReadDirOp struct + type ReadDirOption func(*ReadDirOp) + func WithExt(ext string) ReadDirOption