diff options
Diffstat (limited to 'lib/private/FilesMetadata/Model/FilesMetadata.php')
-rw-r--r-- | lib/private/FilesMetadata/Model/FilesMetadata.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/private/FilesMetadata/Model/FilesMetadata.php b/lib/private/FilesMetadata/Model/FilesMetadata.php index 84cb177bc37..3de72357431 100644 --- a/lib/private/FilesMetadata/Model/FilesMetadata.php +++ b/lib/private/FilesMetadata/Model/FilesMetadata.php @@ -156,6 +156,23 @@ class FilesMetadata implements IFilesMetadata { $this->metadata[$key]->setEditPermission($permission); } + + public function getEtag(string $key): string { + if (!array_key_exists($key, $this->metadata)) { + throw new FilesMetadataNotFoundException(); + } + + return $this->metadata[$key]->getEtag(); + } + + public function setEtag(string $key, string $etag): void { + if (!array_key_exists($key, $this->metadata)) { + throw new FilesMetadataNotFoundException(); + } + + $this->metadata[$key]->setEtag($etag); + } + /** * @param string $key metadata key * |