Documentation
¶
Overview ¶
Package opentree provides a simple interface to create and manage a subfilesystem using the `open_tree` syscall. It allows for creating a new subfilesystem by cloning an existing filesystem tree and provides a method to close the filesystem when it is no longer needed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS represents a subfilesystem that can be created and managed. It uses a file descriptor to represent the mounted filesystem and provides methods to create and close the filesystem. The creation of the filesystem is idempotent, meaning it can be called multiple times without side effects.
func NewFromPath ¶
NewFromPath creates a new fs instance from path.
func (*FS) Open ¶
Open initializes the fs 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.