block

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHostFileSystems

func GetHostFileSystems(binPath string) ([]string, error)

GetHostFileSystems returns a slice of strings of filesystems supported by the host. Supported filesytems are restricted to ext3,ext4,xfs,btrfs

func Supported

func Supported() error

Supported queries the underlying system to check if the required system executables are present If not, it returns an error

Types

type Device

type Device struct {
	Capacity uint64
	FullPath string
	Name     string
	RealDev  string
}

Device is a struct for holding details about a compatible block device

func GetDevice

func GetDevice(path string) (*Device, error)

GetDevice returns a Device struct with info about the given device, or an error if it doesn't exist or is not a block device

func GetDeviceInDir

func GetDeviceInDir(dir, name string) (*Device, error)

GetDeviceInDir returns a Device struct with info about the given device, by looking for name in dir.

func ListDevices

func ListDevices(dir string) ([]*Device, error)

ListDevices returns a slice of Device for all valid blockdevices found in the given device directory

Jump to

Keyboard shortcuts

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