vdfbinary

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: GPL-3.0, MIT Imports: 6 Imported by: 0

Documentation

Overview

Package vdfbinary parses Valve's binary VDF format.

This is a vendored and modified version of github.com/TimDeve/valve-vdf-binary Licensed under MIT. See LICENSE file in this directory.

Package vdfbinary parses Valve's binary VDF format.

This is a vendored and modified version of github.com/TimDeve/valve-vdf-binary Licensed under MIT. See LICENSE file in this directory.

Package vdfbinary parses Valve's binary VDF format.

This is a vendored and modified version of github.com/TimDeve/valve-vdf-binary Licensed under MIT. See LICENSE file in this directory.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyVDF     = errors.New("the vdf you are trying to parse appears empty")
	ErrNotBinaryVDF = errors.New("the vdf appears not to be binary, are you sure it is not a text vdf?")
	ErrCorruptedVDF = errors.New("reached the end of the file earlier than expected, your file might be corrupted")
)

Functions

This section is empty.

Types

type Shortcut

type Shortcut struct {
	AppName  string
	Exe      string
	Icon     string
	StartDir string
	Tags     []string
	AppID    uint32
	IsHidden bool
}

Shortcut represents a Steam non-Steam game shortcut. Fields are ordered for optimal memory alignment.

func ParseShortcuts

func ParseShortcuts(buf io.Reader) ([]Shortcut, error)

ParseShortcuts parses Steam's shortcuts.vdf binary format. This is a modified version that treats tags, icon, and IsHidden as optional fields to handle shortcuts created by third-party tools like EmuDeck/Lutris.

type VdfMap

type VdfMap map[string]VdfValue

type VdfValue

type VdfValue interface {
	AsString() (string, bool)
	GetString(key string) (string, bool)
	AsUint() (uint32, bool)
	GetUint(key string) (uint32, bool)
	AsInt() (int, bool)
	GetInt(key string) (int, bool)
	AsFloat() (float32, bool)
	GetFloat(key string) (float32, bool)
	AsBool() (value, ok bool)
	GetBool(key string) (value, ok bool)
	AsMap() (VdfMap, bool)
	GetMap(key string) (VdfMap, bool)
}

func MakeVdfValue

func MakeVdfValue[D vdfValueTypes](s D) VdfValue

func Parse

func Parse(r io.Reader) (VdfValue, error)

Jump to

Keyboard shortcuts

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