# Functions
Clone recursively copies a directory structure from srcFS to dstFS.
Copy copies the contents of oldname to newname.
IsNoSpaceError returns true if the given error indicates that the disk is out of space.
LimitedCopy copies up to maxBytes from oldname to newname.
LinkOrCopy creates newname as a hard link to the oldname file.
NewMem returns a new memory-backed FS implementation.
NewMemFile returns a memory-backed File implementation.
NewStrictMem returns a "strict" memory-backed FS implementation.
NewSyncingFile wraps a writable file and ensures that data is synced periodically as it is written.
OnIndex constructs an injector that returns an error on the (n+1)-th invocation of its MaybeError function.
Prefetch signals the OS (on supported platforms) to fetch the next size bytes in file (as returned by os.File.Fd()) after offset into cache.
No description provided by the author
WithFd takes an inner (unwrapped) and an outer (wrapped) vfs.File, and returns an fdFileWrapper if the inner file has an Fd() method.
WithProbability returns a function that returns an error with the provided probability when passed op.
Wrap wraps an existing vfs.FS implementation, returning a new vfs.FS implementation that shadows operations to the provided FS.
WrapFile wraps an existing vfs.File, returning a new vfs.File that shadows operations to the provided vfs.File.
# Variables
Default is a FS implementation backed by the underlying operating system's file system.
ErrInjected is an error artifically injected for testing fs error paths.
RandomReadsOption is an OpenOption that optimizes opened file handle for random reads, by calling fadvise() with POSIX_FADV_RANDOM on Linux systems to disable readahead.
SequentialReadsOption is an OpenOption that optimizes opened file handle for sequential reads, by calling fadvise() with POSIX_FADV_SEQUENTIAL on Linux systems to enable readahead.
# Structs
DiskUsage summarizes disk space usage on a filesystem.
FS implements vfs.FS, injecting errors into its operations.
InjectIndex implements Injector, injecting an error at a specific index.
MemFS implements FS.
SyncingFileOptions holds the options for a syncingFile.
# Interfaces
File is a readable, writable sequence of bytes.
FS is a namespace for files.
Injector injects errors into FS operations.
OpenOption provide an interface to do work on file handles in the Open() call.
# Type aliases
Op is an enum describing the type of operation performed.