package loopback

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

Index

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

Source Files

loopback_linux.go

Version
v0.4.5 (latest)
Published
Oct 30, 2024
Platform
linux/amd64
Imports
8 packages
Last checked
1 day ago

Tools for package owners.