mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-03-12 00:45:14 +00:00
Update pipe-ipc.js
This commit is contained in:
parent
01b5e7d46f
commit
f904b43777
|
@ -143,7 +143,6 @@ function PipeIPC() {
|
|||
this.getCurrentTime = function() {
|
||||
return new Date().getTime();
|
||||
};
|
||||
|
||||
|
||||
this.setCharset = function(charset) {
|
||||
this.charset = charset;
|
||||
|
@ -381,6 +380,7 @@ function PipeIPC() {
|
|||
return s.length > 1 ? s.substring(1) : '';
|
||||
})(fh.ReadAll());
|
||||
} catch (e) {
|
||||
//console.log(e.message);
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
@ -423,7 +423,7 @@ function PipeIPC() {
|
|||
while (!isRead) {
|
||||
try {
|
||||
var ado = createADO();
|
||||
ado.CharSet = charset;
|
||||
ado.Charset = charset;
|
||||
ado.Open();
|
||||
ado.LoadFromFile(filename);
|
||||
text += ado.ReadText();
|
||||
|
@ -441,8 +441,9 @@ function PipeIPC() {
|
|||
return text;
|
||||
};
|
||||
|
||||
this.loadFromFile = function(filename) {
|
||||
this.write(this.readTextFromFile(filename, this.charset), ForWriting);
|
||||
this.loadFromFile = function(filename, charset) {
|
||||
charset = (typeof charset !== "undefined" ? this.charset : charset);
|
||||
this.write(this.readTextFromFile(filename, charset), ForWriting);
|
||||
};
|
||||
|
||||
this.reload = function(charset) {
|
||||
|
@ -476,7 +477,7 @@ exports.adSaveCreateNotExist = adSaveCreateNotExist;
|
|||
exports.adSaveCreateOverWrite = adSaveCreateOverWrite;
|
||||
exports.adModeReadWrite = adModeReadWrite;
|
||||
|
||||
exports.VERSIONINFO = "PIPE-based IPC Module (pipe-ipc.js) version 0.1.15";
|
||||
exports.VERSIONINFO = "PIPE-based IPC Module (pipe-ipc.js) version 0.1.16";
|
||||
exports.AUTHOR = "abuse@catswords.net";
|
||||
exports.global = global;
|
||||
exports.require = require;
|
||||
|
|
Loading…
Reference in New Issue
Block a user