diskimage

package
v0.0.0-...-273f5df Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cat

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

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

ListFiles returns the list of files in the specified directory.

func Put

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