Documentation
¶
Overview ¶
Package fsopen provides a simple interface to create and manage a filesystem using the Linux syscalls for filesystem operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrRepairUnsupported = errors.New("unsupported filesystem type for repair")
ErrRepairUnsupported is reported when the filesystem does not support repairs.
Functions ¶
This section is empty.
Types ¶
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS represents a filesystem that can be created and managed. It holds the flags and strings used for configuration, as well as the file descriptor for the mounted filesystem.
func (*FS) MountAt ¶
MountAt mounts the filesystem at the specified path.
EXPERIMENTAL: This function is experimental and may change in the future.
func (*FS) Open ¶
Open initializes the filesystem and returns the file descriptor for the mounted filesystem. If the filesystem is already created, it returns the existing file descriptor. This method is idempotent, meaning it can be called multiple times without side effects.
func (*FS) UnmountFrom ¶
UnmountFrom unmounts the filesystem from the specified path.
EXPERIMENTAL: This function is experimental and may change in the future.
type Option ¶
type Option struct {
// contains filtered or unexported fields
}
Option is a functional option for configuring a filesystem instance.
func WithBinaryParameters ¶
WithBinaryParameters adds a map of byte arrays to the filesystem configuration.
func WithBoolParameter ¶
WithBoolParameter adds a flag parameter to the filesystem configuration.
func WithMountFlags ¶
WithMountFlags adds a flag set that will be passed to Fsmount syscall.
func WithProjectQuota ¶
WithProjectQuota sets the project quota flag.
func WithSource ¶
WithSource adds a source to the filesystem configuration.
func WithStringParameter ¶
WithStringParameter adds a map of strings to the filesystem configuration.