summaryrefslogtreecommitdiffstats
path: root/lib/public/Files/FileInfo.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-10-29 15:23:33 +0100
committerRobin Appelman <robin@icewind.nl>2018-10-29 15:24:02 +0100
commite5c3e4b76fac1c4a1235781229486f53ffcb93c1 (patch)
treeb0fa6702bc14c23af090277d489dd75493db2803 /lib/public/Files/FileInfo.php
parent4a642fc0048c03a24aa199ccc9df23d547f69aa2 (diff)
downloadnextcloud-server-e5c3e4b76fac1c4a1235781229486f53ffcb93c1.tar.gz
nextcloud-server-e5c3e4b76fac1c4a1235781229486f53ffcb93c1.zip
Add getExtension() to FileInfo
this is a fairly common operation so it makes sense to prevent having to repeatedly implement it. Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/public/Files/FileInfo.php')
-rw-r--r--lib/public/Files/FileInfo.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/public/Files/FileInfo.php b/lib/public/Files/FileInfo.php
index 1fe71b356c5..e25a47e83cd 100644
--- a/lib/public/Files/FileInfo.php
+++ b/lib/public/Files/FileInfo.php
@@ -259,4 +259,12 @@ interface FileInfo {
* @since 9.0.0
*/
public function getChecksum();
+
+ /**
+ * Get the extension of the file
+ *
+ * @return string
+ * @since 15.0.0
+ */
+ public function getExtension(): string;
}