lnk

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package lnk reads Windows shell links (.lnk files): the parts of the MS-SHLLINK format that give the target, arguments, working folder and icon. Installers put a "Play …" shortcut on the desktop; for a repack that is the most reliable record of which executable actually starts the game.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link struct {
	Target  string // absolute path of the target, environment variables expanded
	Args    string
	WorkDir string
	Icon    string
	Name    string // the shortcut's description
	RelPath string // target relative to the .lnk file (fallback when Target is empty)
}

Link is what a shortcut starts.

func Parse

func Parse(b []byte) (*Link, error)

Parse reads a shell link from its bytes. Environment variables in the target, working folder and icon are expanded.

func ReadFile

func ReadFile(path string) (*Link, error)

ReadFile parses the .lnk at path and resolves a relative target.

Jump to

Keyboard shortcuts

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