Update file.js

This commit is contained in:
Namhyeon Go 2023-09-20 19:07:50 +09:00 committed by GitHub
parent 59e76de85d
commit c9c6d87803
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,7 +139,7 @@ function includeFile(FN) {
}
function appendFile(FN, content, charset) {
var pipe = PipeIPC.connect("volatile");
var pipe = PipeIPC.connect(PipeIPC.CRC32(FN));
pipe.setCharset(charset);
pipe.startRecorder(FN, PipeIPC.ForAppending);
pipe.write(content);
@ -148,7 +148,7 @@ function appendFile(FN, content, charset) {
}
function rotateFile(FN, content, numOfLines, charset) {
var pipe = PipeIPC.connect("volatile");
var pipe = PipeIPC.connect(PipeIPC.CRC32(FN));
pipe.setCharset(charset);
pipe.setMaxSentences(numOfLines);
pipe.startRecorder(FN, PipeIPC.ForAppending);
@ -171,6 +171,6 @@ exports.includeFile = includeFile;
exports.appendFile = appendFile;
exports.rotateFile = rotateFile;
exports.VERSIONINFO = "File Library (file.js) version 0.2.4";
exports.VERSIONINFO = "File Library (file.js) version 0.2.5";
exports.global = global;
exports.require = global.require;