Ruby 4.0 リファレンスマニュアル

singleton method File.file?

file?(path) -> bool[permalink][rdoc][edit]
(string | _ToPath | IO file) → bool

FileTest?.file? と同じです。

[PARAM] path:
パスを表す文字列か IO オブジェクトを指定します。