るりまサーチ (Ruby 2.5.0)

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

別のキーワード

  1. io popen
  2. io pipe
  3. io each
  4. io readlines
  5. io each_line

ライブラリ

クラス

モジュール

検索結果

FileTest.#size?(file) -> Integer | nil (54355.0)

ファイルのサイズを返します。ファイルが存在しない時や ファイルのサイズが0の時には nil を返します。

ファイルのサイズを返します。ファイルが存在しない時や
ファイルのサイズが0の時には nil を返します。

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

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

//emlist[例][ruby]{
IO.write("testfile", "test")
FileTest.size?("testfile") # => 4
File.delete("testfile")
FileTest.size?("testfile") ...

File.size?(path) -> Integer | nil (54319.0)

FileTest.#size? と同じです。

FileTest.#size? と同じです。

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