public function delete()
    {
        if ($this->isAbsolute()) {
            if ($this->isFile() || $this->isLink()) {
                // delete file and symlink
                return unlink($this->getPathname());
            } elseif ($this->isDir()) {
                // delete directory
                return rmdir($this->getPathname());
            }
            return false;
        } else {
            throw new FileException('Given file path is not a absolute path.');
        }
    }
public function delete()
    {
        if ($this->isAbsolute()) {
            if ($this->isFile() || $this->isLink()) {
                // delete file and symlink
                return unlink($this->getPathname());
            } elseif ($this->isDir()) {
                // delete directory
                return rmdir($this->getPathname());
            }
            return false;
        } else {
            throw new FileException('Given file path is not a absolute path.');
        }
    }
public function delete ( ) { if ( $ this -> isAbsolute ( ) ) { if ( $ this -> isFile ( ) || $ this -> isLink ( ) ) { // delete file and symlink return unlink ( $ this -> getPathname ( ) ) ; } elseif ( $ this -> isDir ( ) ) { // delete directory return rmdir ( $ this -> getPathname ( ) ) ; } return false ; } else { throw new FileException ( 'Given file path is not a absolute path.' ) ; } }
delete the file or empty directory of the current file path

@return      bool            true if file or directory was deleted, false if file or directory was not found
@throws      FileException
delete the file or empty directory of the current file path