public function exists($filename)
    {
        $filename = $this->path($filename);

        if (!$this->isDirectory($filename)) {
            return file_exists($filename);
        }

        $tmp = getcwd();

        $r = chdir($filename);

        chdir($tmp);

        return $r;
    }
public function exists($filename)
    {
        $filename = $this->path($filename);

        if (!$this->isDirectory($filename)) {
            return file_exists($filename);
        }

        $tmp = getcwd();

        $r = chdir($filename);

        chdir($tmp);

        return $r;
    }
public function exists ( $ filename ) { $ filename = $ this -> path ( $ filename ) ; if ( ! $ this -> isDirectory ( $ filename ) ) { return file_exists ( $ filename ) ; } $ tmp = getcwd ( ) ; $ r = chdir ( $ filename ) ; chdir ( $ tmp ) ; return $ r ; }
Check the existence of a file

@param string $filename

@return bool
Check the existence of a file