Sha256: e6efc2f007181b5ce73897bee15e16dccad90477c306ae17e8ca1684042bfe47
Contents?: true
Size: 555 Bytes
Versions: 16
Compression:
Stored size: 555 Bytes
Contents
module Vagrant module Downloaders # "Downloads" a file to a temporary file. Basically, this downloader # simply does a file copy. class File < Base def self.match?(uri) ::File.exists?(uri) end def prepare(source_url) if !::File.file?(source_url) raise Actions::ActionException.new(:downloader_file_doesnt_exist, :source_url => source_url) end end def download!(source_url, destination_file) FileUtils.cp(source_url, destination_file.path) end end end end
Version data entries
16 entries across 16 versions & 2 rubygems