Method: Chef::Provider::File#action_delete
- Defined in:
- lib/chef/provider/file.rb
#action_delete ⇒ Object
256 257 258 259 260 261 262 263 264 |
# File 'lib/chef/provider/file.rb', line 256 def action_delete if ::File.exists?(@new_resource.path) converge_by("delete file #{@new_resource.path}") do backup unless ::File.symlink?(@new_resource.path) ::File.delete(@new_resource.path) Chef::Log.info("#{@new_resource} deleted file at #{@new_resource.path}") end end end |