windrive

package module
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: MIT Imports: 5 Imported by: 1

README

windrive

Go Doc Badge Go Report Card Badge

List physical drives on Windows, including partitions and filesystem information.

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Drive

type Drive struct {
	Name       string
	Path       string
	Size       int64
	Partitions []*Partition
}

func List

func List() ([]*Drive, error)

List returns the physical drives currently connected. Drives without any partition are not included.

func (Drive) IsRemovable added in v0.2.1

func (d Drive) IsRemovable() bool

func (Drive) String added in v0.2.0

func (d Drive) String() string

type FileSystem

type FileSystem struct {
	Kind               string
	Flags              uint32
	MaxComponentLength uint32
}

func (FileSystem) IsReadOnly

func (fs FileSystem) IsReadOnly() bool

type Partition added in v0.2.0

type Partition struct {
	Name       string
	Path       string
	Removable  bool
	FileSystem FileSystem
}

func (Partition) String added in v0.2.0

func (p Partition) String() string

Jump to

Keyboard shortcuts

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