# class Chef::Resource::RemoteFile

### Public Class Methods

new(name, run_context=nil) click to toggle source
Calls superclass method Chef::Resource::File.new

    # File lib/chef/resource/remote_file.rb, line 31
    def initialize(name, run_context=nil)
      super
      @resource_name = :remote_file
      @action = "create"
      @source = []
      @use_etag = true
      @use_last_modified = true
      @ftp_active_mode = false
      @headers = {}
      @provider = Chef::Provider::RemoteFile
    end

### Public Instance Methods

after_created() click to toggle source

    # File lib/chef/resource/remote_file.rb, line 103
    def after_created
      validate_source(@source)
    end

checksum(args=nil) click to toggle source

    # File lib/chef/resource/remote_file.rb, line 53
    def checksum(args=nil)
      set_or_return(
        :checksum,
        args,
        :kind_of => String
      )
    end

ftp_active_mode(args=nil) click to toggle source

    # File lib/chef/resource/remote_file.rb, line 87
    def ftp_active_mode(args=nil)
      set_or_return(
        :ftp_active_mode,
        args,
        :kind_of => [ TrueClass, FalseClass ]
      )
    end

headers(args=nil) click to toggle source

    # File lib/chef/resource/remote_file.rb, line 95
    def headers(args=nil)
      set_or_return(
        :headers,
        args,
        :kind_of => Hash
      )
    end

source(*args) click to toggle source

    # File lib/chef/resource/remote_file.rb, line 43
    def source(*args)
      if not args.empty?
        args = Array(args).flatten
        validate_source(args)
        @source = args
      elsif self.instance_variable_defined?(:@source) == true
        @source
      end
    end

use_conditional_get(true_or_false) click to toggle source

Disable or enable ETag and Last Modified conditional GET. Equivalent to

    use_etag(true_or_false)
    use_last_modified(true_or_false)

    # File lib/chef/resource/remote_file.rb, line 64
    def use_conditional_get(true_or_false)
      use_etag(true_or_false)
      use_last_modified(true_or_false)
    end

use_etag(args=nil) click to toggle source

    # File lib/chef/resource/remote_file.rb, line 69
    def use_etag(args=nil)
      set_or_return(
        :use_etag,
        args,
        :kind_of => [ TrueClass, FalseClass ]
      )
    end

Also aliased as: use_etags
use_etags(args=nil)
Alias for: use_etag
use_last_modified(args=nil) click to toggle source

    # File lib/chef/resource/remote_file.rb, line 79
    def use_last_modified(args=nil)
      set_or_return(
        :use_last_modified,
        args,
        :kind_of => [ TrueClass, FalseClass ]
      )
    end