shared

package
v0.2.18-beta Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BToMb

func BToMb(b uint64) uint64

func FileExists

func FileExists(filename string) bool

func GUnZipFile

func GUnZipFile(sourcePath, targetPath string) error

func GetFileInfo

func GetFileInfo(path string) (string, error)

GetFileInfo returns a compact, aligned key/value summary of a file's metadata, suitable for display in a tooltip. Labels are left-aligned in a fixed column so values line up under a monospace font.

func GetFileSizeMod

func GetFileSizeMod(path string) (string, string, int64, time.Time)

GetFileSizeMod returns the size and modification time of a file both formatted for display and raw, so callers can sort on them without a second stat.

func GetHomeDirPath

func GetHomeDirPath() string

func HumanizeSize

func HumanizeSize(size int64) string

HumanizeSize formats a byte count as a short human-readable string.

func PrintMemUsage

func PrintMemUsage()

func SplitFileName

func SplitFileName(filename string, searchTerm string) (string, string, string)

Types

type EventAction

type EventAction int
const (
	ItemCreated EventAction = iota
	ItemDeleted
)

func (EventAction) String

func (e EventAction) String() string

type EventRecord

type EventRecord struct {
	Filename    string
	Path        string
	ObjectType  ObjectType
	EventID     uint64
	EventTime   int64
	FoundOnScan bool
	IsRename    bool
}

type ObjectType

type ObjectType int
const (
	ItemIsFile ObjectType = iota
	ItemIsDir
	ItemIsSymlink
	ItemIsNamedPipe
	ItemIsSocket
	ItemIsCharDevice
	ItemIsBlockDevice
)

type SearchResult

type SearchResult struct {
	Fullpath   string
	ObjectType ObjectType
}

Jump to

Keyboard shortcuts

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