setName('info:storage')
->setDescription('Get information a single storage')
->addArgument('storage', InputArgument::REQUIRED, 'Storage to get information for');
}
public function execute(InputInterface $input, OutputInterface $output): int {
$storage = $input->getArgument('storage');
$storageId = $this->fileUtils->getNumericStorageId($storage);
if (!$storageId) {
$output->writeln('No storage with id ' . $storage . ' found');
return 1;
}
$info = $this->fileUtils->getStorage($storageId);
if (!$info) {
$output->writeln('No storage with id ' . $storage . ' found');
return 1;
}
$this->writeArrayInOutputFormat($input, $output, $this->fileUtils->formatStorage($info));
return 0;
}
}