MCPcopy Create free account
hub / github.com/FSGModding/FSG_Mod_Assistant / getInfo

Method getInfo

lib/modCheckLib.js:1698–1716  ·  view source on GitHub ↗

* Process savegame * @returns {saveTrackRecord}

()

Source from the content-addressed store, hash-verified

1696 * @returns {saveTrackRecord}
1697 */
1698 async getInfo() {
1699 try {
1700 if ( !fs.existsSync(this.#filePath) ) {
1701 throw new Error(`file does not exist: ${this.#filePath}`)
1702 }
1703
1704 const thisXML = this.#xmlParser.parse(fs.readFileSync(this.#filePath, 'utf-8'))?.inputbinding ?? null
1705
1706 if ( thisXML === null ) {
1707 throw new Error(`Parsing file failed: ${this.#filePath}`)
1708 }
1709
1710 return thisXML
1711
1712 } catch (err) {
1713 this.#log.notice(err)
1714 }
1715 return null
1716 }
1717}
1718
1719module.exports = {

Callers 4

modAssist_main.jsFile · 0.45
testBadFunction · 0.45
testGoodFunction · 0.45

Calls 2

noticeMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected