makefs

package
v1.2.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 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 added in v1.1.0

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.

type Options

type Options struct {
	Label string
	Force 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