class RuboCop::Cop::Chef::RedundantCode::UseCreateIfMissing

Use the ‘:create_if_missing` action instead of `not_if` with a `::File.exist(FOO)` check.

@example

### incorrect
cookbook_file '/logs/foo/error.log' do
  source 'error.log'
  owner 'root'
  group 'root'
  mode '0644'
  not_if { ::File.exists?('/logs/foo/error.log') }
end

remote_file 'Download file' do
  path '/foo/bar'
  source 'https://foo.com/bar'
  owner 'root'
  group 'root'
  mode '0644'
  not_if { ::File.exist?('/foo/bar') }
end

### correct
cookbook_file '/logs/foo/error.log' do
  source 'error.log'
  owner 'root'
  group 'root'
  mode '0644'
  action :create_if_missing
end

remote_file 'Download file' do
  path '/foo/bar'
  source 'https://foo.com/bar'
  owner 'root'
  group 'root'
  mode '0644'
  action :create_if_missing
end