るりまサーチ (Ruby 2.6.0)

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

別のキーワード

  1. _builtin path
  2. pathname to_path
  3. _builtin absolute_path
  4. _builtin to_path
  5. etc cs_path

ライブラリ

クラス

検索結果

Pathname#size? -> bool (63304.0)

FileTest.size?(self.to_s) と同じです。

FileTest.size?(self.to_s) と同じです。


@see FileTest.#size?

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

FileTest.#size? と同じです。

FileTest.#size? と同じです。

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

File::Stat#size? -> Integer | nil (54394.0)

サイズが0の時にはnil、それ以外の場合はファイルサイズを返します。

サイズが0の時にはnil、それ以外の場合はファイルサイズを返します。

//emlist[][ruby]{
require 'tempfile'

fp = Tempfile.new("temp")
p fp.size #=> 0
p File::Stat.new(fp.path).size? #=> nil
fp.print "not 0 "
fp.close
p FileTest.exist?(fp.path) #=> true
p File::Stat.new(fp.path).size? #=> 6
//}