Documentation
¶
Index ¶
- func CommandExists(cmd string) bool
- func ExpandHome(path string) (string, error)
- func FormatBytes(bytes int64) string
- func FormatCount(count int) string
- func FormatDuration(d time.Duration) string
- func FormatPercentage(value, total int64) string
- func GetDirSize(path string) (int64, error)
- func IsWritable(path string) bool
- func PathExists(path string) bool
- func SafeRemove(path string, dryRun bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandExists ¶
CommandExists checks if a command is available in PATH
func ExpandHome ¶
ExpandHome expands ~ to the user's home directory
func FormatBytes ¶
FormatBytes converts bytes to human-readable format (e.g., "1.2 GB")
func FormatCount ¶
FormatCount formats numbers with commas (e.g., "1,234")
func FormatDuration ¶
FormatDuration formats a duration in human-readable format
func FormatPercentage ¶
FormatPercentage formats a percentage with 1 decimal place
func GetDirSize ¶
GetDirSize calculates the total size of a directory recursively
func IsWritable ¶
IsWritable checks if a path is writable by the current user
func PathExists ¶
PathExists checks if a path exists on the filesystem
func SafeRemove ¶
SafeRemove removes a path, respecting the dryRun flag
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.