Sha256: 2ced0d34bfa9ba5a31b1c7265534f4937e1e16a7504525cb43a7168917f5376e
Contents?: true
Size: 565 Bytes
Versions: 40
Compression:
Stored size: 565 Bytes
Contents
require 'fileutils' 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) raise Errors::DownloaderFileDoesntExist if !::File.file?(source_url) end def download!(source_url, destination_file) env.ui.info I18n.t("vagrant.downloaders.file.download") FileUtils.cp(source_url, destination_file.path) end end end end
Version data entries
40 entries across 40 versions & 5 rubygems