4件ヒット
[1-4件を表示]
(0.105秒)
種類
- インスタンスメソッド (3)
- 特異メソッド (1)
検索結果
先頭4件
-
Pathname
# exist? -> bool (63604.0) -
FileTest.exist?(self.to_s) と同じです。
FileTest.exist?(self.to_s) と同じです。
@see FileTest.#exist? -
Dir
. exist?(file _ name) -> bool (54970.0) -
file_name で与えられたディレクトリが存在する場合に真を返します。 そうでない場合は、偽を返します。
file_name で与えられたディレクトリが存在する場合に真を返します。
そうでない場合は、偽を返します。
@param file_name 存在を確認したいディレクトリ名。
//emlist[例][ruby]{
Dir.exist?(".") # => true
File.directory?(".") # => true
//}
@see File.directory? -
Pathname
# delete -> Integer (27337.0) -
self が指すディレクトリあるいはファイルを削除します。
self が指すディレクトリあるいはファイルを削除します。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("/path/to/sample")
pathname.exist? # => true
pathname.unlink # => 1
pathname.exist? # => false
//} -
Pathname
# unlink -> Integer (27337.0) -
self が指すディレクトリあるいはファイルを削除します。
self が指すディレクトリあるいはファイルを削除します。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("/path/to/sample")
pathname.exist? # => true
pathname.unlink # => 1
pathname.exist? # => false
//}