1
0

IMetadataManager.php 769 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. declare(strict_types=1);
  3. namespace OC\Metadata;
  4. use OCP\Files\File;
  5. /**
  6. * Interface to manage additional metadata for files
  7. */
  8. interface IMetadataManager {
  9. /**
  10. * @param class-string<IMetadataProvider> $className
  11. */
  12. public function registerProvider(string $className): void;
  13. /**
  14. * Generate the metadata for one file
  15. */
  16. public function generateMetadata(File $file, bool $checkExisting = false): void;
  17. /**
  18. * Clear the metadata for one file
  19. */
  20. public function clearMetadata(int $fileId): void;
  21. /** @return array<int, FileMetadata> */
  22. public function fetchMetadataFor(string $group, array $fileIds): array;
  23. /**
  24. * Get the capabilities as an array of mimetype regex to the type provided
  25. */
  26. public function getCapabilities(): array;
  27. }