lib/openstack/swift/connection.rb
def container_exists?(containername)
      path = "/#{URI.encode(containername.to_s)}"
      begin
        response = @connection.req("HEAD", path)
      rescue OpenStack::Exception::ItemNotFound
        return false
      end
      true
    end
# Returns true if the requested container exists and returns false otherwise.
#
#   cf.container_exists?('good_container')
#   => true
#
#   cf.container_exists?('bad_container')
#   => false
Returns true if the requested container exists and returns false otherwise.


Returns true if the requested container exists and returns false otherwise .
def container_exists?(containername)
      path = "/#{URI.encode(containername.to_s)}"
      begin
        response = @connection.req("HEAD", path)
      rescue OpenStack::Exception::ItemNotFound
        return false
      end
      true
    end
def container_exists? ( containername ) path = "/#{URI.encode(containername.to_s)}" begin response = @connection . req ( "HEAD" , path ) rescue OpenStack :: Exception :: ItemNotFound return false end true end
Returns true if the requested container exists and returns false otherwise.
Returns true if the requested container exists and returns false otherwise .
containername