types

package
v0.0.0-...-81d58bd Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseInfo

type BaseInfo struct {
	Path       string
	Size       int64
	HumanSize  string
	Filesystem string
	Mountpoint string
	Label      string
	UUID       string
	PARTUUID   string
}

BaseInfo contains the common fields for both disks and partitions

type DiskInfo

type DiskInfo struct {
	BaseInfo   // Embedded struct, inheriting fields from BaseInfo
	Partitions []PartitionInfo
}

DiskInfo represents information about a disk

type FileDiffInfo

type FileDiffInfo struct {
	// AddedLines are the lines added to the file compared to the other file
	AddedLines []string

	// RemovedLines are the lines removed from the file compared to the
	// other file
	RemovedLines []string
}

FileDiff represents the difference between two files.

type FileInfo

type FileInfo struct {
	// Path to the file
	Path string

	// ParentPath is the path to the parent directory of the file
	ParentPath string

	// IsDirectory is true if the file is a directory
	IsDirectory bool

	// Size of the file in bytes
	Size int64

	// Permissions of the file as a Permission struct
	Permissions Permission

	// Extension of the file (e.g. "txt")
	Extension string
}

FileInfo represents information about a file

type PartitionInfo

type PartitionInfo struct {
	BaseInfo // Embedded struct, inheriting fields from BaseInfo
}

PartitionInfo represents information about a disk partition

type Permission

type Permission struct {
	OwnerRead    bool
	OwnerWrite   bool
	OwnerExecute bool

	GroupRead    bool
	GroupWrite   bool
	GroupExecute bool

	OthersRead    bool
	OthersWrite   bool
	OthersExecute bool
}

Permission represents file permissions of a file

func (Permission) String

func (p Permission) String() string

Jump to

Keyboard shortcuts

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