Documentation ¶
Overview ¶
Package btrfs provides bindings for working with btrfs partitions from Go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSubvolume ¶
IsSubvolume returns nil if the path is a valid subvolume. An error is returned if the path does not exist or the path is not a valid subvolume.
func SubvolCreate ¶
SubvolCreate creates a subvolume at the provided path.
func SubvolDelete ¶
SubvolDelete deletes the subvolumes under the given path.
func SubvolSnapshot ¶
SubvolSnapshot creates a snapshot in dst from src. If readonly is true, the snapshot will be readonly.
Types ¶
type Info ¶
type Info struct { ID uint64 // subvolume id ParentID uint64 // aka ref_tree TopLevelID uint64 // not actually clear what this is, not set for now. Offset uint64 // key offset for root DirID uint64 Generation uint64 OriginalGeneration uint64 UUID string ParentUUID string ReceivedUUID string Name string Path string // absolute path of subvolume Root string // path of root mount point Readonly bool // true if the snaps hot is readonly, extracted from flags }
Info describes metadata about a btrfs subvolume.
func SubvolInfo ¶
SubvolInfo returns information about the subvolume at the provided path.
func SubvolList ¶
SubvolList will return the information for all subvolumes corresponding to the provided path.