file

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFromPath

func CreateFromPath(pathName string, size int64) (backend.Storage, error)

Create a backend.Storage from a path to an image file. Should pass a path to a file /tmp/foo.img The provided file must not exist at the time you call CreateFromPath()

func New

func New(f fs.File, readOnly bool) backend.Storage

Create a backend.Storage from provided fs.File

func OpenFromPath

func OpenFromPath(pathName string, readOnly bool) (backend.Storage, error)

Create a backend.Storage from a path to a device Should pass a path to a block device e.g. /dev/sda or a path to a file /tmp/foo.img The provided device/file must exist at the time you call OpenFromPath()

Types

This section is empty.

Jump to

Keyboard shortcuts

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