るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.032秒)

別のキーワード

  1. _builtin exist?
  2. pathname exist?
  3. dir exist?
  4. file exist?
  5. strscan exist?

クラス

検索結果

Dir.exist?(file_name) -> bool (54310.0)

file_name で与えられたディレクトリが存在する場合に真を返します。 そうでない場合は、偽を返します。

file_name で与えられたディレクトリが存在する場合に真を返します。
そうでない場合は、偽を返します。

@param file_name 存在を確認したいディレクトリ名。

//emlist[例][ruby]{
Dir.exist?(".") # => true
File.directory?(".") # => true
//}

@see File.directory?

File.exist?(path) -> bool (54310.0)

FileTest.#exist? と同じです。

FileTest.#exist? と同じです。

@param path パスを表す文字列か IO オブジェクトを指定します。