UNPKG

@moddota/find-steam-app

Version:

Find location of an installed Steam app

18 lines 865 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const fs_extra_1 = tslib_1.__importDefault(require("fs-extra")); const path_1 = tslib_1.__importDefault(require("path")); const vdf_extra_1 = tslib_1.__importDefault(require("vdf-extra")); async function hasManifest(library, appid) { return fs_extra_1.default.pathExists(path_1.default.join(library, `appmanifest_${appid}.acf`)); } exports.hasManifest = hasManifest; async function readManifest(library, appid) { const manifestPath = path_1.default.join(library, `appmanifest_${appid}.acf`); const manifestContent = await fs_extra_1.default.readFile(manifestPath, 'utf8'); const manifestData = vdf_extra_1.default.parse(manifestContent); return manifestData; } exports.readManifest = readManifest; //# sourceMappingURL=manifest.js.map