Update file.js

This commit is contained in:
Namhyeon Go 2025-08-05 17:45:46 +09:00 committed by GitHub
parent 68a57f15fb
commit 444b80e3b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -61,12 +61,13 @@ function writeFile(path, content, charset) {
}
function writeBinaryFile(path, data) {
var binaryStream = CreateObject("ADODB.Stream");
binaryStream.Type = PipeIPC.adTypeBinary;
binaryStream.Open();
binaryStream.Write(data);
binaryStream.SaveToFile(path, adSaveCreateOverWrite);
binaryStream.Close();
return UseObject("ADODB.Stream", function(stream) {
stream.Type = PipeIPC.adTypeBinary;
stream.Open();
stream.Write(data);
stream.SaveToFile(path, adSaveCreateOverWrite);
stream.Close();
});
}
function moveFile(fromPath, toPath) {
@ -189,7 +190,7 @@ exports.loadEnvFromArgs = loadEnvFromArgs;
exports.CdoCharset = PipeIPC.CdoCharset;
exports.VERSIONINFO = "File IO Library (file.js) version 0.2.14";
exports.VERSIONINFO = "File IO Library (file.js) version 0.2.15";
exports.AUTHOR = "gnh1201@catswords.re.kr";
exports.global = global;
exports.require = global.require;