io

package
v1.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DevicePath = "/dev"
View Source
const O_PATH = unix.O_PATH

Variables

This section is empty.

Functions

func IsXattrNotFound

func IsXattrNotFound(err error) bool

func WriteTrunc

func WriteTrunc(dirFd int, filePath string, value []byte) error

Differs from os.WriteFile in that it does not or create file before writing. Intended to write Linux virtual files: sysfs, cgroupfs, etc.

Types

type DevTmpFS

type DevTmpFS interface {
	DevFor(path string) (uint32, uint32, error)
}

type DiskLister

type DiskLister interface {
	ListDisks() ([]string, error)
}

type RealDevTmpFS

type RealDevTmpFS struct {
}

func (RealDevTmpFS) DevFor

func (RealDevTmpFS) DevFor(path string) (uint32, uint32, error)

DevFor returns the major and minor numbers for the device.

func (RealDevTmpFS) ListDisks

func (RealDevTmpFS) ListDisks() ([]string, error)

List all paths under /dev that looks like a disk.

Jump to

Keyboard shortcuts

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