mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-10-26 18:41:18 +00:00
Update file.js
This commit is contained in:
parent
68a57f15fb
commit
444b80e3b5
15
lib/file.js
15
lib/file.js
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user