diskimage

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cat added in v1.5.0

func Cat(imagePath, filePath string) (string, error)

Cat returns the contents of the file as a string. NOTE: this function is only suited for text files and doesn't handle zero bytes properly.

func FormatDisk

func FormatDisk(imagePath string) error

FormatDisk partitions the specified image file by writing an MBR with a single partition and then formatting that partition as an ext4 filesystem.

func ListFiles added in v1.5.0

func ListFiles(imagePath, dir string) ([]string, error)

ListFiles returns the list of files in the specified directory.

func Put added in v1.4.2

func Put(imagePath string, files map[string][]byte) error

Put writes files to the image, making all the necessary subdirs

Types

This section is empty.

Jump to

Keyboard shortcuts

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