Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

FileUtils#remove_entry

remove_entry(path, force = false)

Removes the entry given by path, which should be the entry for a regular file, a symbolic link, or a directory.

Argument path should be interpretable as a path.

Optional argument force specifies whether to ignore raised exceptions of StandardError and its descendants.

Related: FileUtils.remove_entry_secure.