るりまサーチ (Ruby 2.6.0)

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

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file size
  4. file open
  5. file mtime

ライブラリ

クラス

モジュール

検索結果

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

FileTest.#size? と同じです。

FileTest.#size? と同じです。

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

FileTest.#size?(file) -> Integer | nil (63712.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") ...