33件ヒット
[1-33件を表示]
(0.029秒)
種類
- インスタンスメソッド (22)
- 特異メソッド (11)
クラス
- File (11)
-
File
:: Stat (11) - Pathname (11)
検索結果
-
Pathname
# size? -> bool (21101.0) -
FileTest.size?(self.to_s) と同じです。
...FileTest.size?(self.to_s) と同じです。
@see FileTest.#size?... -
File
. size?(path) -> Integer | nil (18207.0) -
FileTest.#size? と同じです。
...FileTest.#size? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。... -
File
:: Stat # size? -> Integer | nil (18131.0) -
サイズが0の時にはnil、それ以外の場合はファイルサイズを返します。
...は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
//}...