# module Chef::Deprecation::Provider::CookbookFile

## Deprecation::Provider::CookbookFile¶ ↑

This module contains the deprecated functions of Chef::Provider::CookbookFile. These functions are refactored to different components. They are frozen and will be removed in Chef 12.

### Public Instance Methods

backup_new_resource() click to toggle source

    # File lib/chef/deprecation/provider/cookbook_file.rb, line 46
    def backup_new_resource
      if ::File.exists?(@new_resource.path)
        backup @new_resource.path
      end
    end

content_stale?() click to toggle source

    # File lib/chef/deprecation/provider/cookbook_file.rb, line 42
    def content_stale?
      ( ! ::File.exist?(@new_resource.path)) || ( ! compare_content)
    end

file_cache_location() click to toggle source

    # File lib/chef/deprecation/provider/cookbook_file.rb, line 31
    def file_cache_location
      @file_cache_location ||= begin
        cookbook = run_context.cookbook_collection[resource_cookbook]
        cookbook.preferred_filename_on_disk_location(node, :files, @new_resource.source, @new_resource.path)
      end
    end

resource_cookbook() click to toggle source

    # File lib/chef/deprecation/provider/cookbook_file.rb, line 38
    def resource_cookbook
      @new_resource.cookbook || @new_resource.cookbook_name
    end