62件ヒット
[1-62件を表示]
(0.158秒)
種類
- インスタンスメソッド (40)
- 特異メソッド (11)
- モジュール関数 (11)
ライブラリ
- ビルトイン (33)
- pathname (11)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6)
クラス
- File (11)
-
File
:: Stat (11) - Pathname (11)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6)
モジュール
- FileTest (11)
検索結果
先頭5件
-
File
:: Stat # size? -> Integer | nil (33432.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
//... -
FileTest
. # size?(file) -> Integer | nil (33419.0) -
ファイルのサイズを返します。ファイルが存在しない時や ファイルのサイズが0の時には nil を返します。
...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") # => nil
//}
@see FileTest.#size, FileTest.#zero?... -
File
. size?(path) -> Integer | nil (33417.0) -
FileTest.#size? と同じです。
...FileTest.#size? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。... -
Pathname
# size? -> bool (30424.0) -
FileTest.size?(self.to_s) と同じです。
...FileTest.size?(self.to_s) と同じです。
@see FileTest.#size?... -
Shell
# size?(file) -> Integer | nil (30414.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#size FileTest.#size?... -
Shell
:: CommandProcessor # size?(file) -> Integer | nil (30414.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#size FileTest.#size?... -
Shell
:: Filter # size?(file) -> Integer | nil (30414.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#size FileTest.#size?...