unlink -> 0[permalink][rdoc]delete -> 0-
self が指すディレクトリあるいはファイルを削除します。
例require "pathname" pathname = Pathname("/path/to/sample") pathname.exist? # => true pathname.unlink # => 0 pathname.exist? # => false
このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ
unlink -> 0[permalink][rdoc]delete -> 0self が指すディレクトリあるいはファイルを削除します。
例require "pathname"
pathname = Pathname("/path/to/sample")
pathname.exist? # => true
pathname.unlink # => 0
pathname.exist? # => false