modulepackage
0.0.0-20191023080646-7f5e33cefd5a
Repository: https://github.com/lrita/fileutil.git
Documentation: pkg.go.dev
# Functions
AtomicWriteFile **atomically** writes data to a file named by filename.
CreateDirAll is similar to TouchDirAll but returns error if the deepest directory was not empty.
Exist returns true if a file or directory exists.
Fdatasync is similar to fsync(), but does not flush modified metadata unless that metadata is needed in order to allow a subsequent data retrieval to be correctly handled.
Frangesync invokes sync_file_range syscall for the given offset and nbytes.
Fsync is a wrapper around file.Sync().
IsDirWriteable checks if dir is writable by writing and removing a file to dir.
IsSyncFileRangeSupported returns true when the filesystem which the given file is located in is support sync_file_range syscall.
No description provided by the author
OpenDir opens a directory for syncing.
Preallocate tries to allocate the space for given file.
ReadDir returns the filenames in the given directory in sorted order.
SyncDir call fsync() on a directory.
TouchDirAll is similar to os.MkdirAll.
No description provided by the author
ZeroToEnd zeros a file starting from SEEK_CUR to its SEEK_END.
# Constants
This used to call syscall.Flock() but that call fails with EBADF on NFS.
This used to call syscall.Flock() but that call fails with EBADF on NFS.
This used to call syscall.Flock() but that call fails with EBADF on NFS.
FsMagicAufs filesystem id for Aufs.
FsMagicBtrfs filesystem id for Btrfs.
FsMagicCramfs filesystem id for Cramfs.
FsMagicEcryptfs filesystem id for eCryptfs.
FsMagicExtfs filesystem id for Extfs.
FsMagicF2fs filesystem id for F2fs.
FsMagicGPFS filesystem id for GPFS.
FsMagicJffs2Fs filesystem if for Jffs2Fs.
FsMagicJfs filesystem id for Jfs.
FsMagicNfsFs filesystem id for NfsFs.
FsMagicOverlay filesystem id for overlay.
FsMagicRAMFs filesystem id for RamFs.
FsMagicReiserFs filesystem id for ReiserFs.
FsMagicSmbFs filesystem id for SmbFs.
FsMagicSquashFs filesystem id for SquashFs.
FsMagicTmpFs filesystem id for TmpFs.
FsMagicVxFS filesystem id for VxFs.
FsMagicXfs filesystem id for Xfs.
FsMagicZfs filesystem id for Zfs.
PrivateDirMode grants owner to make/remove files inside the directory.
PrivateFileMode grants owner to read/write a file.
# Variables
No description provided by the author
# Structs
No description provided by the author