{"record":{"id":"d63e083cb9239b7c","repo":"phacility/phabricator","slug":"specify-which-files-to-operate-on-or-use-all","errorCode":null,"errorMessage":"Specify which files to operate on, or use \"--all\" to operate on all files.","messagePattern":"Specify which files to operate on, or use \"--all\" to operate on all files\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/files/management/PhabricatorFilesManagementWorkflow.php","lineNumber":35,"sourceCode":"        'name' => 'from-engine',\n        'param' => 'storage-engine',\n        'help' => pht('Operate on files stored in a specified engine.'),\n      ),\n    );\n  }\n\n  protected function buildIterator(PhutilArgumentParser $args) {\n    $viewer = $this->getViewer();\n\n    $is_all = $args->getArg('all');\n\n    $names = $args->getArg('names');\n    $from_engine = $args->getArg('from-engine');\n\n    $any_constraint = ($from_engine || $names);\n\n    if (!$is_all && !$any_constraint) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify which files to operate on, or use \"--all\" to operate on '.\n          'all files.'));\n    }\n\n    if ($is_all && $any_constraint) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'You can not operate on all files with \"--all\" and also operate '.\n          'on a subset of files by naming them explicitly or using '.\n          'constraint flags like \"--from-engine\".'));\n    }\n\n    // If we're migrating specific named files, convert the names into IDs\n    // first.\n    $ids = null;\n    if ($names) {\n      $files = $this->loadFilesWithNames($names);","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/files/management/PhabricatorFilesManagementWorkflow.php#L17-L53","documentation":"Error \"Specify which files to operate on, or use \"--all\" to operate on all files.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/files/management/PhabricatorFilesManagementWorkflow.php:35 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}