# class Chef::FileAccessControl

## Chef::FileAccessControl¶ ↑

FileAccessControl objects set the owner, group and mode of `file` to the values specified by a value object, usually a Chef::Resource.

### Attributes

current_resource[R]
file[R]
provider[R]
resource[R]

### Public Class Methods

new(current_resource, new_resource, provider) click to toggle source

FileAccessControl objects set the owner, group and mode of `file` to the values specified by `resource`. `file` is completely independent of any file or path attribute on `resource`, so it is possible to set access control settings on a tempfile (for example).

### Arguments:¶ ↑

resource: probably a Chef::Resource::File object (or subclass), but

    this is not required. Must respond to +owner+, +group+,
    and +mode+

file: The file whose access control settings you wish to modify,

    given as a String.

TODO requiring #current_resource will break cookbook_file template_file

    # File lib/chef/file_access_control.rb, line 54
    def initialize(current_resource, new_resource, provider)
      @current_resource, @resource, @provider = current_resource, new_resource, provider
      @file = @current_resource.path
      @modified = false
    end

### Public Instance Methods

modified?() click to toggle source

    # File lib/chef/file_access_control.rb, line 60
    def modified?
      @modified
    end