Update file.js

This commit is contained in:
Namhyeon Go 2021-08-17 05:23:49 +09:00 committed by GitHub
parent e06e7fac6f
commit 052c2eb07d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -150,9 +150,9 @@ exports.writeBinaryFile = function(FN, DATA) {
exports.moveFile = function(FROM, TO) {
var FSO = CreateObject("Scripting.FileSystemObject");
var res = FSO.MoveFile(FROM, TO);
var result = FSO.MoveFile(FROM, TO);
FSO = null;
return res;
return result;
};
/////////////////////////////////////////////////////////////////////////////////
@ -161,9 +161,20 @@ exports.moveFile = function(FROM, TO) {
exports.createFolder = function(FN) {
var FSO = CreateObject("Scripting.FileSystemObject");
var res = FSO.CreateFolder(FN);
var result = FSO.CreateFolder(FN);
FSO = null;
return res;
return result;
};
/////////////////////////////////////////////////////////////////////////////////
// exports.deleteFolder
/////////////////////////////////////////////////////////////////////////////////
exports.createFolder = function(FN) {
var FSO = CreateObject("Scripting.FileSystemObject");
var result = FSO.DeleteFolder(FN);
FSO = null;
return result;
};
/////////////////////////////////////////////////////////////////////////////////
@ -172,9 +183,9 @@ exports.createFolder = function(FN) {
exports.deleteFile = function(FN) {
var FSO = CreateObject("Scripting.FileSystemObject");
var res = FSO.DeleteFile(FN);
var result = FSO.DeleteFile(FN);
FSO = null;
return res;
return result;
};
/////////////////////////////////////////////////////////////////////////////////