# class Chef::Resource::RemoteDirectory

### Public Class Methods

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

    # File lib/chef/resource/remote_directory.rb, line 35
    def initialize(name, run_context=nil)
      super
      @resource_name = :remote_directory
      @path = name
      @source = ::File.basename(name)
      @delete = false
      @action = :create
      @recursive = true
      @purge = false
      @files_backup = 5
      @files_owner = nil
      @files_group = nil
      @files_mode = 0644 unless Chef::Platform.windows?
      @overwrite = true
      @allowed_actions.push(:create, :create_if_missing, :delete)
      @cookbook = nil
      @provider = Chef::Provider::RemoteDirectory
    end

### Public Instance Methods

cookbook(args=nil) click to toggle source

    # File lib/chef/resource/remote_directory.rb, line 116
    def cookbook(args=nil)
      set_or_return(
        :cookbook,
        args,
        :kind_of => String
      )
    end

files_backup(arg=nil) click to toggle source

    # File lib/chef/resource/remote_directory.rb, line 68
    def files_backup(arg=nil)
      set_or_return(
        :files_backup,
        arg,
        :kind_of => [ Integer, FalseClass ]
      )
    end

files_group(arg=nil) click to toggle source

    # File lib/chef/resource/remote_directory.rb, line 84
    def files_group(arg=nil)
      set_or_return(
        :files_group,
        arg,
        :regex => Chef::Config[:group_valid_regex]
      )
    end

files_mode(arg=nil) click to toggle source

    # File lib/chef/resource/remote_directory.rb, line 92
    def files_mode(arg=nil)
      set_or_return(
        :files_mode,
        arg,
        :regex => /^\d{3,4}$/
      )
    end

files_owner(arg=nil) click to toggle source

    # File lib/chef/resource/remote_directory.rb, line 100
    def files_owner(arg=nil)
      set_or_return(
        :files_owner,
        arg,
        :regex => Chef::Config[:user_valid_regex]
      )
    end

overwrite(arg=nil) click to toggle source

    # File lib/chef/resource/remote_directory.rb, line 108
    def overwrite(arg=nil)
      set_or_return(
        :overwrite,
        arg,
        :kind_of => [ TrueClass, FalseClass ]
      )
    end

purge(arg=nil) click to toggle source

    # File lib/chef/resource/remote_directory.rb, line 76
    def purge(arg=nil)
      set_or_return(
        :purge,
        arg,
        :kind_of => [ TrueClass, FalseClass ]
      )
    end

source(args=nil) click to toggle source

    # File lib/chef/resource/remote_directory.rb, line 60
    def source(args=nil)
      set_or_return(
        :source,
        args,
        :kind_of => String
      )
    end