mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-10-21 16:20:56 +00:00
Update pipe-ipc.js
This commit is contained in:
parent
d05d4deb03
commit
a035304803
|
@ -145,6 +145,15 @@ function PipeIPC() {
|
||||||
this.startRecorder = function(filename, iomode) {
|
this.startRecorder = function(filename, iomode) {
|
||||||
this.savefile = filename;
|
this.savefile = filename;
|
||||||
this.tmpfile = this.savefile + ".tmp";
|
this.tmpfile = this.savefile + ".tmp";
|
||||||
|
|
||||||
|
// read a text from save file
|
||||||
|
var isExistsSaveFile = createFSO().FileExists(this.savefile);
|
||||||
|
if (isExistsSaveFile) {
|
||||||
|
var handler = createFSO().OpenTextFile(this.tmpfile, ForWriting, true, TristateTrue);
|
||||||
|
handler.Write(this.readTextFromFile(filename));
|
||||||
|
handler.Close();
|
||||||
|
}
|
||||||
|
|
||||||
this.openRecorder(iomode);
|
this.openRecorder(iomode);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -364,7 +373,7 @@ function PipeIPC() {
|
||||||
|
|
||||||
|
|
||||||
this.loadFromFile = function(filename) {
|
this.loadFromFile = function(filename) {
|
||||||
return this.readTextFromFile(filename);
|
this.write(this.readTextFromFile(filename));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -392,7 +401,7 @@ exports.adSaveCreateNotExist = adSaveCreateNotExist;
|
||||||
exports.adSaveCreateOverWrite = adSaveCreateOverWrite;
|
exports.adSaveCreateOverWrite = adSaveCreateOverWrite;
|
||||||
exports.adModeReadWrite = adModeReadWrite;
|
exports.adModeReadWrite = adModeReadWrite;
|
||||||
|
|
||||||
exports.VERSIONINFO = "PIPE-based IPC Module (pipe-ipc.js) version 0.1.6";
|
exports.VERSIONINFO = "PIPE-based IPC Module (pipe-ipc.js) version 0.1.8";
|
||||||
exports.AUTHOR = "abuse@catswords.net";
|
exports.AUTHOR = "abuse@catswords.net";
|
||||||
exports.global = global;
|
exports.global = global;
|
||||||
exports.require = require;
|
exports.require = require;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user