steam

package
v0.0.0-...-a7ced67 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_CONFIG = `` /* 140-byte string literal not displayed */

Variables

This section is empty.

Functions

func GetPlaytimes

func GetPlaytimes(config *Config) (map[string]time.Time, error)

Return a map from Steam App ID to the most recent time each game was played. If multiple Steam users are defined on the system, the most recent time across all users is returned.

func IsRunning

func IsRunning() (bool, error)

func TotalSizeOfLibraryBytes

func TotalSizeOfLibraryBytes(library *Library, apps []*InstalledApp) uint64

Types

type Config

type Config struct {
	SteamMainDir            string     `toml:"steam_main_dir"`
	SSDs                    []*Library `toml:"SSD"`
	HDDs                    []*Library `toml:"HDD"`
	MigrateThresholdSeconds int        `toml:"migrate_threshold_seconds"`
}

func GetConfig

func GetConfig() (*Config, error)

type InstalledApp

type InstalledApp struct {
	AppID           string
	AppName         string
	InstallDirBase  string
	SizeOnDiskBytes uint64
	ManifestPath    string
	Library         *Library
}

func AppsBySizeForLibrary

func AppsBySizeForLibrary(library *Library, apps []*InstalledApp) []*InstalledApp

func GetInstalledApps

func GetInstalledApps(config *Config) ([]*InstalledApp, error)

type Library

type Library struct {
	Type            string
	Path            string `toml:"path"`
	VolumeName      string
	FreeSpaceBytes  uint64
	TotalSpaceBytes uint64
	PercentFree     float64
}

func (*Library) GetManifestPaths

func (l *Library) GetManifestPaths() ([]string, error)

Jump to

Keyboard shortcuts

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