code: 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;
      }
docs: Checks whether directory exists
  
  @throws DirectoryException
  @return bool