MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / onClickChooseDirectory

Function onClickChooseDirectory

public/components/files/MainFiles.js:435–450  ·  view source on GitHub ↗
(parentPath, name)

Source from the content-addressed store, hash-verified

433 }
434 }
435 function onClickChooseDirectory(parentPath, name) {
436 if (parentPath === '/' && name === '.Trash') {
437 return;
438 }
439 const chosenDirectoryIndex = chosenDirectories.value.findIndex(directory => directory.parent_path === parentPath && directory.directory_name === name);
440 if (chosenDirectoryIndex === -1) {
441 chosenDirectories.value = [...chosenDirectories.value, {
442 parent_path: parentPath,
443 directory_name: name
444 }];
445 } else {
446 const newChosenDirectories = chosenDirectories.peek();
447 newChosenDirectories.splice(chosenDirectoryIndex, 1);
448 chosenDirectories.value = [...newChosenDirectories];
449 }
450 }
451 function onClickChooseFile(parentPath, name) {
452 const chosenFileIndex = chosenFiles.value.findIndex(file => file.parent_path === parentPath && file.file_name === name);
453 if (chosenFileIndex === -1) {

Callers 2

chooseAllItemsFunction · 0.70
ListFilesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected