add functions to handle array of source paths

pull/4767/head
Joseph Izang 9 months ago
parent a26da45901
commit 23fb65d696
  1. 18
      libs/remix-ui/workspace/src/lib/actions/index.ts

@ -656,3 +656,21 @@ export const moveFolderIsAllowed = async (src: string, dest: string) => {
return isAllowed
}
export const moveFilesIsAllowed = async (src: string[], dest: string) => {
const fileManager = plugin.fileManager
const boolArray: boolean[] = []
for (const srcFile of src) {
boolArray.push(await fileManager.moveFileIsAllowed(srcFile, dest))
}
return boolArray.every(p => p === true) || false
}
export const moveFoldersIsAllowed = async (src: string[], dest: string) => {
const fileManager = plugin.fileManager
const boolArray: boolean[] = []
for (const srcFile of src) {
boolArray.push(await fileManager.moveDirIsAllowed(srcFile, dest))
}
return boolArray.every(p => p === true) || false
}

Loading…
Cancel
Save