From a6946628389c78744bd23422d228fee2357c5ee8 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 18 Apr 2009 09:51:51 +0000 Subject: [PATCH] "file_exists for vfs" --- phpgwapi/inc/class.egw_vfs.inc.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/phpgwapi/inc/class.egw_vfs.inc.php b/phpgwapi/inc/class.egw_vfs.inc.php index 82fc1cd4fa..6c1eb45dc3 100644 --- a/phpgwapi/inc/class.egw_vfs.inc.php +++ b/phpgwapi/inc/class.egw_vfs.inc.php @@ -227,6 +227,17 @@ class egw_vfs extends vfs_stream_wrapper return $path[0] == '/' && is_link(self::PREFIX.$path); } + /** + * file_exists() version working only inside the vfs + * + * @param string $path + * @return boolean + */ + static function file_exists($path) + { + return $path[0] == '/' && file_exists(self::PREFIX.$path); + } + /** * Mounts $url under $path in the vfs, called without parameter it returns the fstab *