Ruby 2.5.0 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > Fileクラス > size?
size?(path) -> Integer | nil
FileTest.#size? と同じです。