るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.031秒)
トップページ > バージョン:2.4.0[x] > クラス:Dir[x] > クエリ:file[x] > クエリ:exist?[x]

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file ctime
  4. file atime
  5. file size

ライブラリ

検索結果

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

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

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

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

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

@see File.directory?...