public function exists(): bool
    {
        if (! file_exists($this->path)) {
            return false;
        }
        
        if (! is_dir($this->path)) {
            throw new DirectoryException("Entry {path} exists, but it is not a directory!", array(
                'path' => $this->path
            ));
        }
        
        return true;
    }
public function exists(): bool
    {
        if (! file_exists($this->path)) {
            return false;
        }
        
        if (! is_dir($this->path)) {
            throw new DirectoryException("Entry {path} exists, but it is not a directory!", array(
                'path' => $this->path
            ));
        }
        
        return true;
    }
public function exists ( ) : bool { if ( ! file_exists ( $ this -> path ) ) { return false ; } if ( ! is_dir ( $ this -> path ) ) { throw new DirectoryException ( "Entry {path} exists, but it is not a directory!" , array ( 'path' => $ this -> path ) ) ; } return true ; }
Checks whether directory exists

@throws DirectoryException
@return bool
Checks whether directory exists