mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 15:04:58 +00:00
fix
This commit is contained in:
parent
62b46d1dc3
commit
879708da6a
|
@ -214,7 +214,11 @@ function includeFile(FN) {
|
|||
}
|
||||
|
||||
function appendFile(FN, content, charset) {
|
||||
return writeFile(FN, readFile(FN, charset) + content, charset);
|
||||
if (fileExists(FN)) {
|
||||
return writeFile(FN, readFile(FN, charset) + content, charset);
|
||||
} else {
|
||||
return writeFile(FN, content, charset);
|
||||
}
|
||||
}
|
||||
|
||||
exports.fileExists = fileExists;
|
||||
|
|
14
lib/nmap.js
Normal file
14
lib/nmap.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
// NMAP API
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var NMAPObject = function() {
|
||||
this.binPath = "bin\\32bit\\nmap-7.92\\nmap.exe";
|
||||
|
||||
this.start = function() {
|
||||
var cmd = [];
|
||||
// .. todo ..
|
||||
};
|
||||
};
|
||||
|
||||
exports.NMAPObject = NMAPObject;
|
16
lib/shell.js
16
lib/shell.js
|
@ -159,9 +159,17 @@ exports.run = function(cmd, fork) {
|
|||
return (new ShellObject()).run(cmd, fork);
|
||||
};
|
||||
|
||||
exports.runVisibleWindow = function(cmd, fork) {
|
||||
exports.show = function(cmd, fork) {
|
||||
return (new ShellObject()).setVisibleWindow(true).run(cmd, fork);
|
||||
}
|
||||
};
|
||||
|
||||
exports.runAs = function(FN, args) {
|
||||
return (new ShellObject()).runAs(FN, args);
|
||||
};
|
||||
|
||||
exports.showAs = function(FN, args) {
|
||||
return (new ShellObject()).setVisibleWindow(true).runAs(FN, args);
|
||||
};
|
||||
|
||||
exports.createProcess = function(cmd, workingDirectory) {
|
||||
if (typeof(workingDirectory) !== "undefined") {
|
||||
|
@ -170,10 +178,6 @@ exports.createProcess = function(cmd, workingDirectory) {
|
|||
return (new ShellObject()).setWorkingDirectory(workingDirectory).createProcess(cmd);
|
||||
};
|
||||
|
||||
exports.runAs = function(FN, args) {
|
||||
return (new ShellObject()).runAs(FN, args);
|
||||
};
|
||||
|
||||
exports.createDesktopIcon = function(name, cmd, workingDirectory) {
|
||||
return (new ShellObject()).createDesktopIcon(name, cmd, workingDirectory);
|
||||
};
|
||||
|
|
|
@ -54,4 +54,4 @@ exports.confirm = function(message) {
|
|||
|
||||
exports.prompt = function(message, _default) {
|
||||
return exports.getInterface().Prompt(message, _default);
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue
Block a user