Sha256: df84997bfb1ff26d184fc74b533429ea672c57121208c67e965402fb9b048ee6

Contents?: true

Size: 455 Bytes

Versions: 18

Compression:

Stored size: 455 Bytes

Contents

require 'fileutils'
require 'pe_build/idempotent'

class PEBuild::Transfer::File

  # @param src [URI] The local file path path to the file to copy
  # @param dst [String] The path to destination of the copied file
  def initialize(uri, dst)
    @src = uri.path
    @dst = dst

    @logger = Log4r::Logger.new('vagrant::pe_build::transfer::file')
  end

  include PEBuild::Idempotent

  def copy
    idempotent(@dst) { FileUtils.cp @src, @dst }
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
vagrant-pe_build-0.8.8 lib/pe_build/transfer/file.rb
vagrant-pe_build-0.8.7 lib/pe_build/transfer/file.rb
vagrant-pe_build-0.8.6 lib/pe_build/transfer/file.rb
vagrant-pe_build-0.8.5 lib/pe_build/transfer/file.rb
vagrant-pe_build-0.8.4 lib/pe_build/transfer/file.rb
vagrant-pe_build-0.8.3 lib/pe_build/transfer/file.rb
vagrant-pe_build-0.8.2 lib/pe_build/transfer/file.rb
vagrant-pe_build-0.8.1 lib/pe_build/transfer/file.rb
vagrant-pe_build-0.8.0 lib/pe_build/transfer/file.rb
vagrant-pe_build-0.7.1 lib/pe_build/transfer/file.rb
vagrant-pe_build-0.7.0 lib/pe_build/transfer/file.rb
vagrant-pe_build-0.6.0 lib/pe_build/transfer/file.rb
vagrant-pe_build-0.5.0 lib/pe_build/transfer/file.rb
vagrant-pe_build-0.4.3 lib/pe_build/transfer/file.rb
vagrant-pe_build-0.4.2 lib/pe_build/transfer/file.rb
vagrant-pe_build-0.4.1 lib/pe_build/transfer/file.rb
vagrant-pe_build-0.4.0 lib/pe_build/transfer/file.rb
vagrant-pe_build-0.3.0 lib/pe_build/transfer/file.rb