Documentation
¶
Index ¶
- func CommandExists(cmd string) bool
- func Contains(slice []string, item string) bool
- func FormatFileSize(size int64) string
- func FormatFileSizeColored(size int64) string
- func GetDriveLabel(path string) string
- func GetFileIcon(name string) string
- func GetMountedDrives() []string
- func HighlightMatches(text string, matches []int) string
- func IsCodeFile(name string) bool
- func IsImageFile(name string) bool
- func IsTextPreviewable(path string) bool
- func Min(a, b int) int
- func NormalizeToWSLPath(path string) string
- func ShouldIgnore(name string) bool
- type FileType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandExists ¶
CommandExists checks if a command is available in PATH
func FormatFileSize ¶
FormatFileSize formats a file size in bytes to a human-readable string
func FormatFileSizeColored ¶
FormatFileSizeColored returns a color-styled file size string based on size ranges
func GetDriveLabel ¶ added in v1.0.3
GetDriveLabel returns a human-readable label for a drive path
func GetFileIcon ¶
GetFileIcon returns an emoji icon for a file based on its extension
func GetMountedDrives ¶ added in v1.0.3
func GetMountedDrives() []string
GetMountedDrives returns a list of all mounted drives/volumes
func HighlightMatches ¶
HighlightMatches highlights matched characters in a string
func IsCodeFile ¶
IsCodeFile returns true if the file is a code file based on extension
func IsImageFile ¶
IsImageFile returns true if the file is an image based on extension
func IsTextPreviewable ¶ added in v1.0.3
IsTextPreviewable returns true if we should attempt text preview
func NormalizeToWSLPath ¶ added in v1.0.3
NormalizeToWSLPath normalizes Windows-style paths to WSL format Examples: "L:" -> "/mnt/l", "L:\\" -> "/mnt/l", "L:/foo" -> "/mnt/l/foo" Leaves WSL paths unchanged: "/mnt/l" -> "/mnt/l"
func ShouldIgnore ¶
ShouldIgnore returns true if a file/directory should be ignored
Types ¶
type FileType ¶ added in v1.0.3
type FileType int
FileType represents the category of a file for preview handling
func GetFileType ¶ added in v1.0.3
GetFileType returns the category of file based on extension