fileexplorer

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenFileManager

func OpenFileManager(path string, selectFile bool) error

Types

type DesktopEntry

type DesktopEntry struct {
	Exec string
}

DesktopEntry represents a parsed .desktop file's [Desktop Entry] section. This is a minimal parser that only extracts the fields we need, replacing the full gopkg.in/ini.v1 dependency (~34KB + 68 transitive deps).

func ParseDesktopFile

func ParseDesktopFile(path string) (*DesktopEntry, error)

ParseDesktopFile parses a .desktop file and returns the Desktop Entry section. It follows the Desktop Entry Specification: ParseDesktopFile parses the `[Desktop Entry]` section of the desktop file at path and returns a DesktopEntry. It returns an error if the file cannot be opened or if parsing the file fails.

func ParseDesktopReader

func ParseDesktopReader(r io.Reader) (*DesktopEntry, error)

ParseDesktopReader parses the [Desktop Entry] section of a .desktop file from r and extracts the Exec value. It ignores empty lines and lines starting with '#', treats section names as case-sensitive, and stops parsing after leaving the [Desktop Entry] section. The returned *DesktopEntry has Exec set to the exact value of the Exec key if present (whitespace preserved). An error is returned if reading from r fails.

Jump to

Keyboard shortcuts

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