...

Package loopback

import "github.com/containerd/continuity/testutil/loopback"
Overview
Index

Overview ▾

type Loopback

Loopback device

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

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