るりまサーチ

最速Rubyリファレンスマニュアル検索!
1431件ヒット [1-100件を表示] (0.144秒)
トップページ > クエリ:I[x] > クエリ:RUBY[x] > クエリ:stat[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. kernel $-i

ライブラリ

クラス

キーワード

検索結果

<< 1 2 3 ... > >>

IO#stat -> File::Stat (41336.0)

ファイルのステータスを含む File::Stat オブジェクトを生成して 返します。

...File::Stat オブジェクトを生成して
返します。

@raise Errno::EXXX ステータスの読み込みに失敗した場合に発生します。

@raise IOError 既に close されていた場合に発生します。

//emlist[例][ruby]{
I
O.write("testfile", "This is line one\nThis is lin...
...e two\n")
File.open("testfile") do |f|
s = f.stat
"%o" % s.mode # => "100644"
s.blksize # => 4096
s.atime # => 2018-03-01 23:19:59 +0900
end
//}

@see File#lstat, File.stat, File.lstat...

File.stat(filename) -> File::Stat (21448.0)

filename の情報を含む File::Stat オブジェクトを生成し て返します。

...filename の情報を含む File::Stat オブジェクトを生成し
て返します。

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

@raise Errno::EXXX 情報の取得に失敗した場合に発生します。

//emlist[例][ruby]{
File.stat("testfile").class # => Fil...
...e::Stat
File.stat("testfile").mtime # => 2017-12-10 01:13:56 +0900
//}

@see IO#stat, File#lstat...

GC.stat(key) -> Numeric (18214.0)

GC 内部の統計情報を Hash で返します。

...

GC.stat
# =>
{
:count=>2,
:heap_used=>9,
:heap_length=>11,
:heap_increment=>2,
:heap_live_slot=>6836,
:heap_free_slot=>519,
:heap_final_slot=>0,
:heap_swept_slot=>818,
:total_allocated_object=>7674,
:total_freed_object=>838,
:malloc_increase=>18...
...1034,
:malloc_limit=>16777216,
:minor_gc_count=>2,
:major_gc_count=>0,
:remembered_shady_object=>55,
:remembered_shady_object_limit=>0,
:old_object=>2422,
:old_object_limit=>0,
:oldmalloc_increase=>277386,
:oldmalloc_limit=>16777216
}

戻り値のハッシュ...
...は処理系に依存します。これは将来変更になるかもしれません。

本メソッドは C Ruby 以外では動作しません。...
...は数値を返します。

GC.stat
# =>
{
:count=>0,
:heap_allocated_pages=>24,
:heap_sorted_length=>24,
:heap_allocatable_pages=>0,
:heap_available_slots=>9783,
:heap_live_slots=>7713,
:heap_free_slots=>2070,
:heap_final_slots=>0,
:heap_marked_s...
...:malloc_increase_bytes=>2389312,
:malloc_increase_bytes_limit=>16777216,
:minor_gc_count=>0,
:major_gc_count=>0,
:remembered_wb_unprotected_objects=>0,
:remembered_wb_unprotected_objects_limit=>0,
:old_objects=>0,
:old_objects_limit=>0,
:oldmalloc_increase_b...
...ytes=>2389760,
:oldmalloc_increase_bytes_limit=>16777216
}

戻り値のハッシュは処理系に依存します。これは将来変更になるかもしれません。

本メソッドは C Ruby 以外では動作しません。...

GC.stat(result_hash = {}) -> {Symbol => Integer} (18214.0)

GC 内部の統計情報を Hash で返します。

...

GC.stat
# =>
{
:count=>2,
:heap_used=>9,
:heap_length=>11,
:heap_increment=>2,
:heap_live_slot=>6836,
:heap_free_slot=>519,
:heap_final_slot=>0,
:heap_swept_slot=>818,
:total_allocated_object=>7674,
:total_freed_object=>838,
:malloc_increase=>18...
...1034,
:malloc_limit=>16777216,
:minor_gc_count=>2,
:major_gc_count=>0,
:remembered_shady_object=>55,
:remembered_shady_object_limit=>0,
:old_object=>2422,
:old_object_limit=>0,
:oldmalloc_increase=>277386,
:oldmalloc_limit=>16777216
}

戻り値のハッシュ...
...は処理系に依存します。これは将来変更になるかもしれません。

本メソッドは C Ruby 以外では動作しません。...
...は数値を返します。

GC.stat
# =>
{
:count=>0,
:heap_allocated_pages=>24,
:heap_sorted_length=>24,
:heap_allocatable_pages=>0,
:heap_available_slots=>9783,
:heap_live_slots=>7713,
:heap_free_slots=>2070,
:heap_final_slots=>0,
:heap_marked_s...
...:malloc_increase_bytes=>2389312,
:malloc_increase_bytes_limit=>16777216,
:minor_gc_count=>0,
:major_gc_count=>0,
:remembered_wb_unprotected_objects=>0,
:remembered_wb_unprotected_objects_limit=>0,
:old_objects=>0,
:old_objects_limit=>0,
:oldmalloc_increase_b...
...ytes=>2389760,
:oldmalloc_increase_bytes_limit=>16777216
}

戻り値のハッシュは処理系に依存します。これは将来変更になるかもしれません。

本メソッドは C Ruby 以外では動作しません。...

Kernel$$CHILD_STATUS -> Process::Status | nil (12412.0)

$? の別名

...$? の別名

require "English"

out = `wget https://www.ruby-lang.org/en/about/license.txt -O - 2>/dev/null`

i
f $CHILD_STATUS.to_i == 0
print "wget success\n"
out.split(/\n/).each { |line|
printf "%s\n", line
}
else
print "wget failed\n"
end...

絞り込み条件を変える

FileUtils#ruby(*args) {|result, status| ... } (12229.0)

与えられた引数で Ruby インタプリタを実行します。

...与えられた引数で Ruby インタプリタを実行します。

@param args Ruby インタプリタに与える引数を指定します。

例:
ruby
%{-pe '$_.upcase!' <README}

@see Kernel.#sh...

File::Stat#file? -> bool (12112.0)

通常ファイルの時に真を返します。

...通常ファイルの時に真を返します。

//emlist[][ruby]{
p File::Stat.new($0).file? #=> true
//}...

File.lstat(filename) -> File::Stat (9479.0)

File.statと同様ですが、シンボリックリンクに関してリンクそのものの 情報を File::Stat として返します。lstat(2) を実装していないシステムでは、File.stat と同じです。

...File.statと同様ですが、シンボリックリンクに関してリンクそのものの
情報を File::Stat として返します。lstat(2) を実装していないシステムでは、File.stat と同じです。

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

@rai...
...se Errno::EXXX 情報の取得に失敗した場合に発生します。

//emlist[例][ruby]{
# link.rb は t.rb のシンボリックリンク
File.lstat("link.rb") == File.stat("t.rb") # => false
File.stat("link.rb") == File.stat("t.rb") # => true
//}

@see IO#stat, File#lstat...

File#lstat -> File::Stat (9369.0)

ファイルの状態を含む File::Stat オブジェクトを生成して返します。 シンボリックリンクに関してリンクそのものの情報を返します。 lstat(2) を実装していないシステムでは、IO#statと同じです。

...File::Stat オブジェクトを生成して返します。
シンボリックリンクに関してリンクそのものの情報を返します。
lstat(2) を実装していないシステムでは、IO#statと同じです。

@raise Errno::EXXX 失敗した場合に発生します。

@raise IOE...
...ose されている場合に発生します。

//emlist[例][ruby]{
# testlink は testfile のシンボリックリンク
File.open("testlink") do |f|
p f.lstat == File.stat("testfile") # => false
p f.stat == File.stat("testfile") # => true
end
//}

@see IO#stat, File.stat, File.lstat...

JSON::State.from_state(options) -> JSON::State (9312.0)

与えられた options によって生成した JSON::State のインスタンスを返します。

...えられた options によって生成した JSON::State のインスタンスを返します。

@param options JSON::State のインスタンスか、ハッシュを指定します。

@return options がハッシュである場合は、それによって初期化した JSON::State を...
...。options が JSON::State のインスタンスである場合は単に
options を返します。いずれでも無い場合は、何も設定されていない JSON::State の
インスタンスを返します。

//emlist[例 Hash を指定][ruby]{
require "json"

json_state = JS...
...m_state(indent: "\t")
json_state.class # => JSON::Ext::Generator::State
json_state.indent # => "\t"
//}

//emlist[例 JSON::State を指定][ruby]{
require "json"

json_state = JSON::State.from_state(indent: "\t")
# JSON を出力する何らかの処理を実行する
copy = JSON::State.from_state...

絞り込み条件を変える

<< 1 2 3 ... > >>