Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const os = require('os');
var nwGui = require('nw.gui');
nwGui.setAlwaysOnTop = function(isOnTop) {
nwGui.Window.get().setAlwaysOnTop(isOnTop);;
}
var fileIO = {};
fileIO.fs = require('fs');
fileIO.mkdirp = require('mkdirp');
fileIO.path = require('path');
fileIO.readFile = function(path, callback) {
this.fs.readFile(path, 'utf8', function(err, data) {
if (err) {
Events.Error(err);
callback({ error: true, msg: err, data: '' });
} else
callback({ error: false, msg: '', data: data });
});
}
fileIO.readAllFiles = function(dirname, onFileContent, onError) {
const os = require('os');
var nwGui = require('nw.gui');
nwGui.setAlwaysOnTop = function(isOnTop) {
nwGui.Window.get().setAlwaysOnTop(isOnTop);;
}
var fileIO = {};
fileIO.fs = require('fs');
fileIO.mkdirp = require('mkdirp');
fileIO.path = require('path');
fileIO.readFile = function(path, callback) {
this.fs.readFile(path, 'utf8', function(err, data) {
if (err) {
Events.Error(err);
callback({ error: true, msg: err, data: '' });
} else
callback({ error: false, msg: '', data: data });
});
}
fileIO.readAllFiles = function(dirname, onFileContent, onError) {