# README
go-fio - optimized file I/O routines
Description
This is a collection of cross platform file I/O and File system functions. These use concurrency to speed up the underlying functions.
fio.Info
: a serializable version of Stat/Lstat that uses OS specific functions- Utilities to copy a file or dir along with all its metadata (including XATTR) The file copy functions will use the best underlying primitive like reflink(2); and fallback to using mmap based copy.
Safefile
: a wrapper overos.OpenFile
that atomically commits the writes. This uses a temporary file for all the I/O and callingClose()
atomically renames the temporary file to the intended file.
Subpackages
cmp
: compares two directory trees and returns their differencesclone
: clones a source directory tree to a destination - skipping over identical files.walk
: A concurrent directory tree traversal library
# Functions
ClearXattr deletes all the extended attributes of a file.
CopyFd copies open files 'src' to 'dst' using the most efficient OS primitive available on the runtime platform.
CopyFile copies files 'src' to 'dst' using the most efficient OS primitive available on the runtime platform.
DelXattr deletes one or more extended attributes of a file.
GetXattr returns all the extended attributes of a file.
ClearXattr deletes all the extended attributes of a file.
LDelXattr deletes one or more extended attributes of a file.
LGetXattr returns all the extended attributes of a file.
LReplaceXattr replaces all the extended attributes of 'nm' with new attributes in 'x'.
LSetXattr sets/updates the xattr list for a given file.
Lstat is like os.Lstat() but also returns xattr.
Lstatm is like Lstat except it uses the caller's supplied memory.
No description provided by the author
No description provided by the author
NewSafeFile creates a new temporary file that would either be aborted or safely renamed to the correct name.
NewWorkPool creates a worker pool that invokes caller provided worker 'fp'.
ReplaceXattr replaces all the extended attributes of 'nm' with new attributes in 'x'.
SetXattr sets/updates the xattr list for a given file.
Stat is like os.Stat() but also returns xattr.
Statm is like Stat above - except it uses caller supplied memory for the stat(2) info.
# Variables
Error returned if new work is submitted after Wait() or if Wait() is called multiple times.
Error returned if Wait() is called without closing the work submission.
No description provided by the author
# Structs
CopyError represents the errors returned by CopyFile and CopyFd.
Info represents a file/dir metadata in a normalized form It satisfies the fs.FileInfo interface and notably supports extended file system attributes (`xattr(7)`).
Pair represents the Stat/Lstat info of a pair of related file system entries in the source and destination.
SafeFile is an io.WriteCloser which uses a temporary file that will be atomically renamed when there are no errors and caller invokes Close().
No description provided by the author
# Type aliases
No description provided by the author
Xattr is a collection of all the extended attributes of a given file.