diff options
Diffstat (limited to 'apps/files_external/lib/Command')
-rw-r--r-- | apps/files_external/lib/Command/Applicable.php | 1 | ||||
-rw-r--r-- | apps/files_external/lib/Command/Backends.php | 1 | ||||
-rw-r--r-- | apps/files_external/lib/Command/Config.php | 1 | ||||
-rw-r--r-- | apps/files_external/lib/Command/Create.php | 1 | ||||
-rw-r--r-- | apps/files_external/lib/Command/Delete.php | 1 | ||||
-rw-r--r-- | apps/files_external/lib/Command/Dependencies.php | 1 | ||||
-rw-r--r-- | apps/files_external/lib/Command/Export.php | 1 | ||||
-rw-r--r-- | apps/files_external/lib/Command/Import.php | 9 | ||||
-rw-r--r-- | apps/files_external/lib/Command/ListCommand.php | 1 | ||||
-rw-r--r-- | apps/files_external/lib/Command/Option.php | 1 | ||||
-rw-r--r-- | apps/files_external/lib/Command/Scan.php | 15 | ||||
-rw-r--r-- | apps/files_external/lib/Command/Verify.php | 1 |
12 files changed, 29 insertions, 5 deletions
diff --git a/apps/files_external/lib/Command/Applicable.php b/apps/files_external/lib/Command/Applicable.php index ecb635c052a..4d5e264bfaf 100644 --- a/apps/files_external/lib/Command/Applicable.php +++ b/apps/files_external/lib/Command/Applicable.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Command/Backends.php b/apps/files_external/lib/Command/Backends.php index 399bdadcacf..7fab0477adf 100644 --- a/apps/files_external/lib/Command/Backends.php +++ b/apps/files_external/lib/Command/Backends.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Command/Config.php b/apps/files_external/lib/Command/Config.php index 0736749f6d9..883b4a2f3e7 100644 --- a/apps/files_external/lib/Command/Config.php +++ b/apps/files_external/lib/Command/Config.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Command/Create.php b/apps/files_external/lib/Command/Create.php index 4396d2e2b13..3307015518a 100644 --- a/apps/files_external/lib/Command/Create.php +++ b/apps/files_external/lib/Command/Create.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Command/Delete.php b/apps/files_external/lib/Command/Delete.php index 3e6ccf751a8..9f121250f7d 100644 --- a/apps/files_external/lib/Command/Delete.php +++ b/apps/files_external/lib/Command/Delete.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Command/Dependencies.php b/apps/files_external/lib/Command/Dependencies.php index 1bb57778129..d2db8a8c9af 100644 --- a/apps/files_external/lib/Command/Dependencies.php +++ b/apps/files_external/lib/Command/Dependencies.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only diff --git a/apps/files_external/lib/Command/Export.php b/apps/files_external/lib/Command/Export.php index 0735d94d89d..59484d0e788 100644 --- a/apps/files_external/lib/Command/Export.php +++ b/apps/files_external/lib/Command/Export.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Command/Import.php b/apps/files_external/lib/Command/Import.php index bf36bf5d5c1..a9ed76fbe40 100644 --- a/apps/files_external/lib/Command/Import.php +++ b/apps/files_external/lib/Command/Import.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -112,10 +113,10 @@ class Import extends Base { foreach ($mounts as $mount) { foreach ($existingMounts as $existingMount) { if ( - $existingMount->getMountPoint() === $mount->getMountPoint() && - $existingMount->getApplicableGroups() === $mount->getApplicableGroups() && - $existingMount->getApplicableUsers() === $mount->getApplicableUsers() && - $existingMount->getBackendOptions() === $mount->getBackendOptions() + $existingMount->getMountPoint() === $mount->getMountPoint() + && $existingMount->getApplicableGroups() === $mount->getApplicableGroups() + && $existingMount->getApplicableUsers() === $mount->getApplicableUsers() + && $existingMount->getBackendOptions() === $mount->getBackendOptions() ) { $output->writeln('<error>Duplicate mount (' . $mount->getMountPoint() . ')</error>'); return self::FAILURE; diff --git a/apps/files_external/lib/Command/ListCommand.php b/apps/files_external/lib/Command/ListCommand.php index 84c1b569e9d..350916b6c2c 100644 --- a/apps/files_external/lib/Command/ListCommand.php +++ b/apps/files_external/lib/Command/ListCommand.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Command/Option.php b/apps/files_external/lib/Command/Option.php index 6051c9c5fbd..3fda3fcb3cf 100644 --- a/apps/files_external/lib/Command/Option.php +++ b/apps/files_external/lib/Command/Option.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/files_external/lib/Command/Scan.php b/apps/files_external/lib/Command/Scan.php index 4f29dae1ce0..75d98878baa 100644 --- a/apps/files_external/lib/Command/Scan.php +++ b/apps/files_external/lib/Command/Scan.php @@ -54,6 +54,11 @@ class Scan extends StorageAuthBase { 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(); } @@ -84,7 +89,15 @@ class Scan extends StorageAuthBase { }); try { - $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); + } } catch (LockedException $e) { if (is_string($e->getReadablePath()) && str_starts_with($e->getReadablePath(), 'scanner::')) { if ($e->getReadablePath() === 'scanner::') { diff --git a/apps/files_external/lib/Command/Verify.php b/apps/files_external/lib/Command/Verify.php index 32c94fc582a..18cbc5a6774 100644 --- a/apps/files_external/lib/Command/Verify.php +++ b/apps/files_external/lib/Command/Verify.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. |