instance method
Pathname#unlink
() -> ::Integer
unlink
pathname_builtin.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/pathname_builtin.rb, line 1153
def unlink()
Dir.unlink @path
rescue Errno::ENOTDIR
File.unlink @path
end
Removes a file or directory, using File.unlink or Dir.unlink as necessary.