るりまサーチ

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

別のキーワード

  1. _builtin nil?
  2. nilclass nil?
  3. object nil?
  4. _builtin nil
  5. object nil

検索結果

File::Stat#size? -> Integer | nil (18236.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 (18223.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 (18201.0)

FileTest.#size? と同じです。

...FileTest.#size? と同じです。

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

Shell#size?(file) -> Integer | nil (15201.0)

FileTest モジュールにある同名のクラスメソッドと同じです.

...FileTest モジュールにある同名のクラスメソッドと同じです.

@param file ファイル名を表す文字列を指定します。

@see FileTest.#size FileTest.#size?...

Shell::CommandProcessor#size?(file) -> Integer | nil (15201.0)

FileTest モジュールにある同名のクラスメソッドと同じです.

...FileTest モジュールにある同名のクラスメソッドと同じです.

@param file ファイル名を表す文字列を指定します。

@see FileTest.#size FileTest.#size?...

絞り込み条件を変える

Shell::Filter#size?(file) -> Integer | nil (15201.0)

FileTest モジュールにある同名のクラスメソッドと同じです.

...FileTest モジュールにある同名のクラスメソッドと同じです.

@param file ファイル名を表す文字列を指定します。

@see FileTest.#size FileTest.#size?...