るりまサーチ (Ruby 2.7.0)

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

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

クラス

モジュール

検索結果

FileTest.#exist?(file) -> bool (78337.0)

ファイルが存在する時に真を返します。そうでない場合、あるいはシステムコールに失敗した場合などには false を返します。

ファイルが存在する時に真を返します。そうでない場合、あるいはシステムコールに失敗した場合などには false を返します。

@param file ファイル名を表す文字列か IO オブジェクトを指定します。

@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。

例:
FileTest.exist?('/etc/passwd') # => true
FileTest.exist?('/etc') # => true
FileTest.exist?('/etc/no_such_file') # => false...

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

FileTest.#exist? と同じです。

FileTest.#exist? と同じです。

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