lnk

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package lnk writes and reads Windows .lnk shortcut files, the Windows counterpart of package desktopentry.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupported = errors.New("lnk: shortcut files are Windows only")

ErrUnsupported is returned by Write, Arguments and Target off Windows.

Functions

func Arguments

func Arguments(string) (string, error)

Arguments is Windows only.

func Files

func Files(dir string) ([]string, error)

Files lists the .lnk files directly in dir; a missing dir holds none.

func Target added in v0.2.1

func Target(string) (string, error)

Target is Windows only.

func Write

func Write(string, Shortcut) error

Write is Windows only.

Types

type Shortcut

type Shortcut struct {
	Target      string
	Arguments   string
	WorkingDir  string
	Icon        string // "path,index", as the shell's IconLocation reads it
	Description string
}

Shortcut is what a .lnk launches. Target is required; an empty field of the others is left unset.

Jump to

Keyboard shortcuts

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