datapath

package
v0.0.0-...-63dc931 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package datapath implements automatic detection of Nox game data directory.

Index

Constants

This section is empty.

Variables

View Source
var Log = log.New("path")

Functions

func CheckData

func CheckData(path string) bool

CheckData checks if a directory contains Nox game data.

func Data

func Data(path ...string) string

Data returns the current Nox data dir. If additional args are provided, they will be joined with the data dir. If no data directory was set, it will try to locate it automatically using FindData.

func FindData

func FindData() string

FindData locates Nox game data path. It returns empty string if not found. It does not affect data path returned by Data.

func Maps

func Maps(path ...string) string

Maps returns the current Nox maps dir. If additional args are provided, they will be joined with the maps dir.

func Save

func Save(path ...string) string

Save returns the current Nox save dir. If additional args are provided, it will be joined with the save dir.

func SaveNameFromPath

func SaveNameFromPath(src string) string

SaveNameFromPath gives a save directory name based on a path to player save file.

func SetData

func SetData(dir string)

SetData the Nox data dir.

Types

This section is empty.

Jump to

Keyboard shortcuts

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