Method not available on this version
This method is only available on newer versions.
The first available version (v2_6_3) is shown here.
remove_file(path, config = {})
public
Removes a file at the given location.
Parameters
path |
path of the file to be changed
|
config |
give :verbose => false to not log the status.
|
Example
remove_file 'README'
remove_file 'app/controllers/application_controller.rb'
# File lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb, line 318
def remove_file(path, config = {})
return unless behavior == :invoke
path = File.expand_path(path, destination_root)
say_status :remove, relative_to_original_destination_root(path), config.fetch(:verbose, true)
if !options[:pretend] && File.exist?(path)
require "fileutils"
::FileUtils.rm_rf(path)
end
end