btrfs

package module
v0.0.0-...-48ebc5f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2015 License: BSD-3-Clause Imports: 8 Imported by: 0

README

go-btrfs

golang bindings for btrfs (libbtrfs)

Documentation

https://godoc.org/github.com/vbatts/go-btrfs/

Install

To build, the btrfs-progs headers will need to be present.

On fedora, run: dnf install btrfs-progs-devel On debian, run: apt-get install btrfs-tools

Then you can run:

go get github.com/vbatts/go-btrfs

LICENSE

See LICENSE docs.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrorNameTooLong is returned if the name is longer than the default 255 characters
	ErrorNameTooLong = errors.New("name length too long")
)

Functions

func BuildVersion

func BuildVersion() string

BuildVersion returns the build version of libbtrfs, if available

func IsSubvolume

func IsSubvolume(dirpath string) (bool, error)

IsSubvolume tests whether path `dirpath` is a btrfs subvolume

func LibVersion

func LibVersion() int

LibVersion returns the library version of libbtrfs, if available

func SubvolCreate

func SubvolCreate(dirpath, name string) error

SubvolCreate creates a new btrfs subvolume, with dirpath being the root directory

func SubvolDelete

func SubvolDelete(dirpath, name string) error

SubvolDelete deletes the subvolume of `name` with `dirpath` as the root directory.

func SubvolSnapshot

func SubvolSnapshot(srcdirpath, dirpath, name string) error

SubvolSnapshot creates a new btrfs subvolume snapshot. With `dirpath` being the root directory, make a snapshot of `srcdirpath`, with name `name`.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL