diff options
Diffstat (limited to 'lib/util.php')
-rwxr-xr-x | lib/util.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php index 1f666a5e37f..b7dc2207e6c 100755 --- a/lib/util.php +++ b/lib/util.php @@ -894,4 +894,11 @@ class OC_Util { return $value; } + + public static function basename($file) + { + $file = rtrim($file, '/'); + $t = explode('/', $file); + return array_pop($t); + } } |