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

@ -1,5 +1,6 @@
import fileMoveOrCopy from '../../../../FlowHelpers/1.0.0/fileMoveOrCopy';
import {
getContainer, getFileAbosluteDir, getFileName, moveFileAndValidate,
getContainer, getFileAbosluteDir, getFileName,
} from '../../../../FlowHelpers/1.0.0/fileUtils';
import {
IpluginDetails,
@ -66,9 +67,10 @@ const plugin = async (args: IpluginInputArgs): Promise<IpluginOutputArgs> => {
await new Promise((resolve) => setTimeout(resolve, 2000));
await moveFileAndValidate({
inputPath: currentPath,
outputPath: newPathTmp,
await fileMoveOrCopy({
operation: 'move',
sourcePath: currentPath,
destinationPath: newPathTmp,
args,
});
@ -83,9 +85,10 @@ const plugin = async (args: IpluginInputArgs): Promise<IpluginOutputArgs> => {
await new Promise((resolve) => setTimeout(resolve, 2000));
await moveFileAndValidate({
inputPath: newPathTmp,
outputPath: newPath,
await fileMoveOrCopy({
operation: 'move',
sourcePath: newPathTmp,
destinationPath: newPath,
args,
});