loopback

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loopback

type Loopback struct {
	// File is the underlying sparse file
	File string
	// Device is /dev/loopX
	Device string
	// contains filtered or unexported fields
}

Loopback device

func New

func New(size int64) (*Loopback, error)

New creates a loopback device

func (*Loopback) Close

func (l *Loopback) Close() error

Close detaches the device and removes the underlying file

func (*Loopback) HardSize

func (l *Loopback) HardSize() (int64, error)

HardSize returns st_blocks * 512; see stat(2)

func (*Loopback) SoftSize

func (l *Loopback) SoftSize() (int64, error)

SoftSize returns st_size

Jump to

Keyboard shortcuts

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