From c4ccdaf1aa4c7528b88c979599646419ffc0fc29 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Thu, 21 Sep 2023 18:55:35 +0900 Subject: [PATCH] Update file.js --- lib/file.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/file.js b/lib/file.js index 6cb1c05..c5ac512 100644 --- a/lib/file.js +++ b/lib/file.js @@ -54,9 +54,14 @@ function fileGet(FN) { ///////////////////////////////////////////////////////////////////////////////// function readFile(FN, charset) { - var pipe = PipeIPC.create(); + var text = ''; + var pipe = PipeIPC.connect("volatile"); 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.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.require = global.require;