new SteamConfig()
Properties:
Name | Type | Description |
---|---|---|
rootPath |
Path
|
The root of the Steam installation. |
user |
Object
|
Current user. |
libraries |
Array
|
A Path-type entry for each of the non-default Steam Library Folders of the Steam installation. |
appendToApps |
Boolean
|
Whether to append apps or destroy the old data each time a single steamapps folder is loaded. |
cacheEnabled |
Boolean
|
The current cache setting. Enabled = true, disabled = false. |
cacheFolder |
Path
|
Path to use for the cache folder. |
appinfo |
Object
|
Steam/appcache/appinfo.vdf. |
config |
Object
|
Steam/config/config.vdf. |
libraryfolders |
Object
|
Steam/steamapps/libraryfolders.vdf. |
localconfig |
Object
|
Steam/userdata/{user.accountId}.localconfig.vdf as an object. |
loginusers |
Object
|
Steam/config/loginusers.vdf as an object. |
packageinfo |
Object
|
Steam/appcache/packageinfo.vdf as an object. |
registry |
Object
|
Platform-specific: On Linux/Mac: registry.vdf as an object. On Windows: Registry as an object. |
shortcuts |
Object
|
Steam/userdata/{this.user.accountId}/config/shortcuts.vdf as an object. |
sharedconfig |
Object
|
Steam/userdata/{this.user.accountId}/7/remote/sharedconfig.vdf as an object. |
skins |
Array
|
Platform-specific skins folder entries (that are skins) as an array. |
steamapps |
Array
|
The appmanifest files of Steam/steamapps as an array. |
- Source:
Throws:
-
- If there is an error creating an instance of the Windows Registry, when running on Windows.
- Type
-
Error
Methods
detectRoot() → {Path}
Attempt to detect the root installation path based on platform-specific default installation locations.
- Source:
Throws:
-
- If the current OS is not supported.
- Type
-
Error
Returns:
- Type:
-
Path
- The detected path, or null if the default path is not found.
detectUser() → {Object}
Attempt to detect the current user based on Registry.HKCU.Software.Valve.Steam.AutoLoginUser
.
- Source:
Throws:
-
- If loginusers or the registry have not been loaded yet.
- Type
-
Error
Returns:
- Type:
-
Object
- The detected user, or null if none is found.
getPath(name) → {Path}
Get the path to a named Steam file.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
name |
String
|
The name of a known Steam configuration file/path, as per SteamPaths |
Throws:
-
- If the path is not known, or if name is an invalid argument.
- Type
-
Error
Returns:
- Type:
-
Path
- The path to the file., or null
(async) load(names)
Load a Steam file/path by name, including storing the data in it's place on this instance of SteamConfig.
Pre-processes arguments using the internal function prepareFileNames to ensure proper load order.
The internal function afterLoad is run on each file after it's been loaded to automatically
handle loading some data such as the locations of non-default Steam Library Folders in the file libraryfolers.vdf
.
- Source:
- See:
Parameters:
Name | Type | Description |
---|---|---|
names |
String
|
Array
|
A string for a single file/path, or an array for a collection of files/paths or the special 'library' entries for non-default Steam Library Folders which will be an entry like |
Throws:
-
- If names is an invalid arg (non-String & non-Array), or any of the entries are not a valid file/path as per SteamPaths.
- Type
-
Error
(async) requestOwnedApps(force)
Request the current user's list of owned apps from the internet.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
force |
Boolean
|
Force to get a new copy instead of loading cached copy. |
Throws:
-
- If the user has not been defined yet, or there is an error reading from or writing to the cache, or there is an error loading the file from the internet, or there is an error parsing the data (XML) and converting it to JSON.
- Type
-
Error
(async) requestTags(force) → {Array}
Request a list of the popular tags from the internet.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
force |
Boolean
|
Force request to get a new copy instead of using a cached copy. |
Throws:
-
- If there is an error loading the tags list from the local cache or the internet.
- Type
-
Error
Returns:
- Type:
-
Array
- An Array of Strings that represents the popular tags on Steam.