filesystem

package
v0.56.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MIT Imports: 8 Imported by: 1

Documentation

Overview

Package filesystem returns information about available filesystems.

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrTimeoutExceeded represents a timeout error
	ErrTimeoutExceeded = errors.New("timeout exceeded")
)

Functions

This section is empty.

Types

type Info added in v0.49.0

type Info []MountInfo

Info represents a list of mounted filesystems.

func CollectInfo added in v0.49.0

func CollectInfo() (Info, error)

CollectInfo returns the list of mounted filesystems

func (Info) AsJSON added in v0.49.0

func (mounts Info) AsJSON() (interface{}, []string, error)

AsJSON returns an interface which can be marshalled to a JSON and contains the value of non-errored fields.

type MountInfo added in v0.48.0

type MountInfo struct {
	// Name is the name of the mounted filesystem.
	Name string `json:"name"`
	// SizeKB is the size of the mounted filesystem in KB.
	SizeKB uint64 `json:"kb_size"`
	// MountedOn is the mount point path of the mounted filesystem.
	MountedOn string `json:"mounted_on"`
}

MountInfo represents a mounted filesystem.

Jump to

Keyboard shortcuts

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