mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-13 21:21:03 +00:00
Update file.js
This commit is contained in:
parent
2d72f6a87b
commit
c4ccdaf1aa
11
lib/file.js
11
lib/file.js
|
@ -54,9 +54,14 @@ function fileGet(FN) {
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
function readFile(FN, charset) {
|
function readFile(FN, charset) {
|
||||||
var pipe = PipeIPC.create();
|
var text = '';
|
||||||
|
var pipe = PipeIPC.connect("volatile");
|
||||||
pipe.setCharset(charset);
|
pipe.setCharset(charset);
|
||||||
return pipe.readTextFromFile(FN);
|
pipe.loadFromFile(FN);
|
||||||
|
text += pipe.read();
|
||||||
|
pipe.destroy();
|
||||||
|
|
||||||
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -175,6 +180,6 @@ exports.includeFile = includeFile;
|
||||||
exports.appendFile = appendFile;
|
exports.appendFile = appendFile;
|
||||||
exports.rotateFile = rotateFile;
|
exports.rotateFile = rotateFile;
|
||||||
|
|
||||||
exports.VERSIONINFO = "File Library (file.js) version 0.2.5";
|
exports.VERSIONINFO = "File Library (file.js) version 0.2.6";
|
||||||
exports.global = global;
|
exports.global = global;
|
||||||
exports.require = global.require;
|
exports.require = global.require;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user