Horde_Vfs_Base::exists PHP Method

exists() public method

Returns if a given file or folder exists in a folder.
public exists ( string $path, string $name ) : boolean
$path string The path to the folder.
$name string The file or folder name.
return boolean True if it exists, false otherwise.
    public function exists($path, $name)
    {
        try {
            $list = $this->listFolder($path);
            return isset($list[$name]);
        } catch (Horde_Vfs_Exception $e) {
            return false;
        }
    }

Usage Example

コード例 #1
0
ファイル: Vfs.php プロジェクト: jubinpatel/horde
 /**
  */
 protected function _exists($keys)
 {
     $out = array();
     foreach ($keys as $key) {
         $out[$key] = $this->_vfs->exists($this->_params['vfspath'], $key);
     }
     return $out;
 }
All Usage Examples Of Horde_Vfs_Base::exists