block

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const BLKGETSIZE64 = C.BLKGETSIZE64

Variables

This section is empty.

Functions

func GetSize64

func GetSize64(devpath string) (uint64, error)

BlkGetSize64 returns the current size of a block device in bytes.

If there is an error, it will be of type *os.SyscallError.

Types

type Device

type Device struct {
	Path string
}

func New

func New(p string) (*Device, error)

func (*Device) BaseName

func (d *Device) BaseName() string

func (*Device) IsAvailable

func (d *Device) IsAvailable() (bool, error)

func (*Device) IsLocal

func (d *Device) IsLocal() bool

func (*Device) QdevID

func (d *Device) QdevID() string

func (*Device) Size

func (d *Device) Size() (uint64, error)

Jump to

Keyboard shortcuts

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