lib/rbvmomi/vim/Datastore.rb
# Upload a file to this datastore.
# @param remote_path [String] Destination path on the datastore.
# @param local_path [String] Source path on the local machine.
# @return [void]
Upload a file to this datastore.
Upload a file to this datastore .
def upload remote_path, local_path
    url = "http#{_connection.http.use_ssl? ? 's' : ''}://#{_connection.http.address}:#{_connection.http.port}#{mkuripath(remote_path)}"
    pid = spawn CURLBIN, "-k", '--noproxy', '*', '-f',
                "-T", local_path,
                "-b", _connection.cookie,
                url,
                :out => '/dev/null'
    Process.waitpid(pid, 0)
    fail "upload failed" unless $?.success?
  end
def upload remote_path , local_path url = "http#{_connection.http.use_ssl? ? 's' : ''}://#{_connection.http.address}:#{_connection.http.port}#{mkuripath(remote_path)}" pid = spawn CURLBIN , "-k" , '--noproxy' , '*' , '-f' , "-T" , local_path , "-b" , _connection . cookie , url , :out => '/dev/null' Process . waitpid ( pid , 0 ) fail "upload failed" unless $? . success? end
Upload a file to this datastore.
Upload a file to this datastore .
None
void
remote_path
Destination path on the datastore.
Destination path on the datastore .
local_path
Source path on the local machine.
Source path on the local machine .