lib/rbvmomi/vim/Datastore.rb
def exists? path
    req = Net::HTTP::Head.new mkuripath(path)
    req.initialize_http_header 'cookie' => @soap.cookie
    resp = @soap.http.request req
    case resp
    when Net::HTTPSuccess
      true
    when Net::HTTPNotFound
      false
    else
      fail resp.inspect
    end
  end
# Check whether a file exists on this datastore.
# @param path [String] Path on the datastore.
Check whether a file exists on this datastore.
Check whether a file exists on this datastore .
def exists? path
    req = Net::HTTP::Head.new mkuripath(path)
    req.initialize_http_header 'cookie' => @soap.cookie
    resp = @soap.http.request req
    case resp
    when Net::HTTPSuccess
      true
    when Net::HTTPNotFound
      false
    else
      fail resp.inspect
    end
  end
def exists? path req = Net :: HTTP :: Head . new mkuripath ( path ) req . initialize_http_header 'cookie' => @soap . cookie resp = @soap . http . request req case resp when Net :: HTTPSuccess true when Net :: HTTPNotFound false else fail resp . inspect end end
Check whether a file exists on this datastore.
Check whether a file exists on this datastore .
path
Path on the datastore.
Path on the datastore .