Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat: add --unscanned option to files_external:scan
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Jun 3, 2025
commit 96fad4d835099341319b29a37363e781b4098f16
15 changes: 14 additions & 1 deletion apps/files_external/lib/Command/Scan.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ protected function configure(): void {
InputOption::VALUE_OPTIONAL,
'The path in the storage to scan',
''
)->addOption(
'unscanned',
'',
InputOption::VALUE_NONE,
'only scan files which are marked as not fully scanned'
);
parent::configure();
}
Expand Down Expand Up @@ -82,7 +87,15 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$this->abortIfInterrupted();
});

$scanner->scan($path);
if ($input->getOption('unscanned')) {
if ($path !== '') {
$output->writeln('<error>--unscanned is mutually exclusive with --path</error>');
return 1;
}
$scanner->backgroundScan();
} else {
$scanner->scan($path);
}

$this->presentStats($output);

Expand Down
Loading