Method: FileUtils.remove_file
- Defined in:
- lib/fileutils.rb
permalink .remove_file(path, force = false) ⇒ Object
Removes the file entry given by path
, which should be the entry for a regular file or a symbolic link.
Argument path
should be interpretable as a path.
Optional argument force
specifies whether to ignore raised exceptions of StandardError and its descendants.
Related: methods for deleting.
1474 1475 1476 1477 1478 |
# File 'lib/fileutils.rb', line 1474 def remove_file(path, force = false) Entry_.new(path).remove_file rescue raise unless force end |