Use fileMoveOrCopy

This commit is contained in:
HaveAGitGat 2023-11-14 07:04:46 +00:00
parent 45180c910f
commit 68dcc8ba94
13 changed files with 673 additions and 41 deletions

View file

@ -40,6 +40,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.details = void 0;
var fileMoveOrCopy_1 = __importDefault(require("../../../../FlowHelpers/1.0.0/fileMoveOrCopy"));
var fileUtils_1 = require("../../../../FlowHelpers/1.0.0/fileUtils");
var normJoinPath_1 = __importDefault(require("../../../../FlowHelpers/1.0.0/normJoinPath"));
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
@ -137,9 +138,10 @@ var plugin = function (args) { return __awaiter(void 0, void 0, void 0, function
}];
}
args.deps.fsextra.ensureDirSync(outputPath);
return [4 /*yield*/, (0, fileUtils_1.moveFileAndValidate)({
inputPath: args.inputFileObj._id,
outputPath: ouputFilePath,
return [4 /*yield*/, (0, fileMoveOrCopy_1.default)({
operation: 'move',
sourcePath: args.inputFileObj._id,
destinationPath: ouputFilePath,
args: args,
})];
case 1: