GRF reader made in Javascript.
The method getFile
can be used to get the Buffer
of the target file, if it exists. null
is returned otherwise.
const GRFReader = require('./GRF');
const grf = new GRFReader('./data.grf');
(async () => {
const clientInfo = await grf.getFile('data\\clientinfo.xml');
if (clientInfo) {
console.log(clientInfo.toString('utf8'));
}
})();