electron/spec/fixtures/module/no-asar.js

16 lines
317 B
JavaScript
Raw Normal View History

const fs = require('node:fs');
const path = require('node:path');
2016-10-07 17:59:18 +00:00
2020-03-20 20:28:31 +00:00
const stats = fs.statSync(path.join(__dirname, '..', 'test.asar', 'a.asar'));
2016-10-07 17:59:18 +00:00
const details = {
isFile: stats.isFile(),
size: stats.size
2020-03-20 20:28:31 +00:00
};
2016-10-07 17:59:18 +00:00
if (process.send != null) {
2020-03-20 20:28:31 +00:00
process.send(details);
2016-10-07 17:59:18 +00:00
} else {
2020-03-20 20:28:31 +00:00
console.log(JSON.stringify(details));
2016-10-07 17:59:18 +00:00
}