makefs

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package makefs provides function to format and grow filesystems.

Index

Constants

View Source
const (
	// FilesystemTypeXFS is the filesystem type for XFS.
	FilesystemTypeXFS = "xfs"
)

Variables

This section is empty.

Functions

func VFAT

func VFAT(partname string, setters ...Option) error

VFAT creates a VFAT filesystem on the specified partition.

func XFS

func XFS(partname string, setters ...Option) error

XFS creates a XFS filesystem on the specified partition.

func XFSGrow

func XFSGrow(partname string) error

XFSGrow expands a XFS filesystem to the maximum possible. The partition MUST be mounted, or this will fail.

func XFSRepair

func XFSRepair(partname, fsType string) error

XFSRepair repairs a XFS filesystem on the specified partition.

Types

type Option

type Option func(*Options)

Option to control makefs settings.

func WithForce

func WithForce(force bool) Option

WithForce forces creation of a filesystem even if one already exists.

func WithLabel

func WithLabel(label string) Option

WithLabel sets the label for the filesystem to be created.

func WithReproducible added in v1.5.0

func WithReproducible(reproducible bool) Option

WithReproducible sets the reproducible flag for the filesystem to be created. This should only be used when creating filesystems on raw disk images.

type Options

type Options struct {
	Label        string
	Force        bool
	Reproducible bool
}

Options for makefs.

func NewDefaultOptions

func NewDefaultOptions(setters ...Option) Options

NewDefaultOptions builds options with specified setters applied.

Jump to

Keyboard shortcuts

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