package
0.0.0-20250310224150-f24d5ce25984
Repository: https://github.com/buildbarn/bb-storage.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
CreateExcl indicates that a new file should be created.
CreateReuse indicates that a new file should be created if it doesn't already exist.
NewDeviceNumberFromMajorMinor creates a new device number based on a major/minor pair.
NewDeviceNumberFromRaw creates a new device number based on a raw value.
NewFileInfo constructs a FileInfo object that returns fixed values for its methods.
NewLocalDirectory creates a directory handle that corresponds to a local path on the system.
NewReferenceCountedDirectoryCloser creates a new ReferenceCountedDirectoryCloser against which Close() can be called exactly once.
NopDirectoryCloser adds a no-op Close method to a Directory object, similar to how io.NopCloser() adds a Close method to a Reader.
# Constants
Data region inside a file.
FileTypeBlockDevice means the file is a block device.
FileTypeCharacterDevice means the file is a character device.
FileTypeDirectory means the file is a directory.
FileTypeFIFO means the file is a FIFO.
FileTypeOther means the file is neither a regular file, a directory or symbolic link.
FileTypeRegularFile means the file is a regular file.
FileTypeSocket means the file is a socket.
FileTypeSymlink means the file is a symbolic link.
Hole inside a sparse file.
# Variables
DeterministicFileModificationTimestamp is a fixed timestamp that can be provided to Directory.Chtimes() to give files deterministic modification times.
DontCreate indicates that opening should fail in case the target file does not exist.
# Structs
CreationMode specifies whether and how Directory.Open*() should create new files.
DeviceNumber stores a block or character device number, both as major/minor pair and the raw value.
FileInfo is a subset of os.FileInfo, only containing the features used by the Buildbarn codebase.
ReferenceCountedDirectoryCloser is a decorator for DirectoryCloser that adds reference counting.
# Interfaces
Directory is an abstraction for accessing a subtree of the file system.
DirectoryCloser is a Directory handle that can be released.
FileAppender is returned by Directory.OpenAppend().
FileReader is returned by Directory.OpenRead().
FileReadWriter is returned by Directory.OpenReadWrite().
FileWriter is returned by Directory.OpenWrite().
# Type aliases
FileInfoList is a list of FileInfo objects returned by Directory.ReadDir().
FileType is an enumeration of the type of a file stored on a file system.
RegionType is an enumeration type that can be provided to FileReader.GetNextRegionOffset() to specify whether the next offset for data or a hole should be obtained.