fdisk

package
v0.0.0-...-3b0d57d Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockDevice

type BlockDevice interface {
	GetDeviceName() string
	GetDeviceFileName() string
	GetName() string
	GetSize() int64
}

BlockDevice represents a Partition or a Hard-Disk

type Disk

type Disk interface {
	BlockDevice
	IsRemovable() bool
	GetPartitions() ([]Partition, error)
	InitializePartitions(Type string, partitionInfos ...PartitionInfo) error
	CreatePartitions(partitionInfos ...PartitionInfo) error
}

Disk represents a Hard-Disk

func GetDisk

func GetDisk(diskName string) (Disk, error)

GetDisk returns information about a single disk

func GetDisks

func GetDisks() ([]Disk, error)

type Partition

type Partition interface {
	BlockDevice
	GetMountPoint() (mountPoint string, err error)
}

Partition represents a Partition on a Hard-Disk

type PartitionInfo

type PartitionInfo struct {
	Size   int64
	Type   int
	Format string
	Name   string
}

Jump to

Keyboard shortcuts

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