Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/theming/lib/ImageManager.php')
-rw-r--r--apps/theming/lib/ImageManager.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/theming/lib/ImageManager.php b/apps/theming/lib/ImageManager.php
index d268552bf94..830ed7f34a9 100644
--- a/apps/theming/lib/ImageManager.php
+++ b/apps/theming/lib/ImageManager.php
@@ -158,8 +158,20 @@ class ImageManager {
return $file;
}
+ public function delete(string $key) {
+ try {
+ $file = $this->appData->getFolder('images')->getFile($key);
+ $file->delete();
+ } catch (NotFoundException $e) {
+ } catch (NotPermittedException $e) {
+ }
+ }
+
/**
* remove cached files that are not required any longer
+ *
+ * @throws NotPermittedException
+ * @throws NotFoundException
*/
public function cleanup() {
$currentFolder = $this->getCacheFolder();