るりまサーチ

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

別のキーワード

  1. io popen
  2. io pipe
  3. io each_line
  4. io each
  5. io readlines

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

IO.popen([env = {}, [cmdname, arg0], *args, execopt={}], mode = "r", opt={}) -> IO (21366.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

...出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io
.puts "foo"
io
.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法は2...
...ション
IO
.popen(["ls", "/", :err=>[:child, :out]]) {|ls_io|
ls_result_with_error = ls_io.read
}

# 上と同じ、配列の外側でもオプションが指定できる
IO
.popen(["ls", "/"], :err=>[:child, :out]) {|ls_io|
ls_result_with_error = ls_io.read
}

@param env 環境...
...式の Hash で渡します。
@param command コマンド名を文字列で指定します。シェルを経由して実行されます。
@param cmdname コマンド名を文字列で指定します
@param arg0 みせかけのコマンド名を指定します
@param args コマンドのパラメ...

IO.popen([env = {}, cmdname, *args, execopt={}], mode = "r", opt={}) -> IO (21366.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

...出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io
.puts "foo"
io
.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法は2...
...ション
IO
.popen(["ls", "/", :err=>[:child, :out]]) {|ls_io|
ls_result_with_error = ls_io.read
}

# 上と同じ、配列の外側でもオプションが指定できる
IO
.popen(["ls", "/"], :err=>[:child, :out]) {|ls_io|
ls_result_with_error = ls_io.read
}

@param env 環境...
...式の Hash で渡します。
@param command コマンド名を文字列で指定します。シェルを経由して実行されます。
@param cmdname コマンド名を文字列で指定します
@param arg0 みせかけのコマンド名を指定します
@param args コマンドのパラメ...

IO.popen(env = {}, [[cmdname, arg0], *args, execopt={}], mode = "r", opt={}) -> IO (21366.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

...出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io
.puts "foo"
io
.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法は2...
...ション
IO
.popen(["ls", "/", :err=>[:child, :out]]) {|ls_io|
ls_result_with_error = ls_io.read
}

# 上と同じ、配列の外側でもオプションが指定できる
IO
.popen(["ls", "/"], :err=>[:child, :out]) {|ls_io|
ls_result_with_error = ls_io.read
}

@param env 環境...
...式の Hash で渡します。
@param command コマンド名を文字列で指定します。シェルを経由して実行されます。
@param cmdname コマンド名を文字列で指定します
@param arg0 みせかけのコマンド名を指定します
@param args コマンドのパラメ...

IO.popen(env = {}, [cmdname, *args, execopt={}], mode = "r", opt={}) -> IO (21366.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

...出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io
.puts "foo"
io
.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法は2...
...ション
IO
.popen(["ls", "/", :err=>[:child, :out]]) {|ls_io|
ls_result_with_error = ls_io.read
}

# 上と同じ、配列の外側でもオプションが指定できる
IO
.popen(["ls", "/"], :err=>[:child, :out]) {|ls_io|
ls_result_with_error = ls_io.read
}

@param env 環境...
...式の Hash で渡します。
@param command コマンド名を文字列で指定します。シェルを経由して実行されます。
@param cmdname コマンド名を文字列で指定します
@param arg0 みせかけのコマンド名を指定します
@param args コマンドのパラメ...

IO.popen(env = {}, command, mode = "r", opt={}) -> IO (21366.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

...出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io
.puts "foo"
io
.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法は2...
...ション
IO
.popen(["ls", "/", :err=>[:child, :out]]) {|ls_io|
ls_result_with_error = ls_io.read
}

# 上と同じ、配列の外側でもオプションが指定できる
IO
.popen(["ls", "/"], :err=>[:child, :out]) {|ls_io|
ls_result_with_error = ls_io.read
}

@param env 環境...
...式の Hash で渡します。
@param command コマンド名を文字列で指定します。シェルを経由して実行されます。
@param cmdname コマンド名を文字列で指定します
@param arg0 みせかけのコマンド名を指定します
@param args コマンドのパラメ...

絞り込み条件を変える

IO.select(reads, writes = [], excepts = [], timeout = nil) -> [[IO]] | nil (21273.0)

select(2) を実行します。

...待ちの IO オブジェクトの中から準備ができたものを
それぞれ配列にして、配列の配列として返します。
タイムアウトした時には nil を返します。

@param reads 入力待ちする IO オブジェクトの配列を渡します。

@param writes 出...
...力待ちする IO オブジェクトの配列を渡します。

@param excepts 例外待ちする IO オブジェクトの配列を渡します。

@param timeout タイムアウトまでの時間を表す数値または nil を指定します。数値で指定したときの単位は秒です。n...
...定した時には IO がどれかひとつレディ状態になるまで待ち続けます。

@raise IOError 与えられた IO オブジェクトが閉じられていた時に発生します。

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

rp, wp = IO.pipe
mesg = "pi...

IO.popen("-", mode = "r", opt={}) -> IO (21271.0)

第一引数に文字列 "-" が指定された時、fork(2) を 行い子プロセスの標準入出力との間にパイプラインを確立します。 親プロセスでは IO オブジェクトを返し、子プロセスでは nil を返します。

...プロセスでは IO オブジェクトを返し、子プロセスでは
nil を返します。

io
= IO.popen("-", "r+")
if io # parent
io
.puts "foo"
p io.gets # => "child output: foo\n"
io
.close
else # child
s = gets
print "child output: " + s
ex...
... IO オブジェクトを引数に
ブロックを実行し、その結果を返します。ブロックの実行後、生成したパイ
プは自動的にクローズされます。
子プロセスでは nil を引数にブロックを実行し終了します。

p IO.popen("-", "r+") {|io|...
...ild output: " + s
end
}
# => "child output: foo\n"

opt ではエンコーディングの設定やプロセス起動のためのオプションが指定できます。
IO
.new や Kernel.#spawn で指定できるものと共通なので
詳しくはそちらを見てください。

@param en...

IO.popen("-", mode = "r", opt={}) {|io| ... } -> object (21271.0)

第一引数に文字列 "-" が指定された時、fork(2) を 行い子プロセスの標準入出力との間にパイプラインを確立します。 親プロセスでは IO オブジェクトを返し、子プロセスでは nil を返します。

...プロセスでは IO オブジェクトを返し、子プロセスでは
nil を返します。

io
= IO.popen("-", "r+")
if io # parent
io
.puts "foo"
p io.gets # => "child output: foo\n"
io
.close
else # child
s = gets
print "child output: " + s
ex...
... IO オブジェクトを引数に
ブロックを実行し、その結果を返します。ブロックの実行後、生成したパイ
プは自動的にクローズされます。
子プロセスでは nil を引数にブロックを実行し終了します。

p IO.popen("-", "r+") {|io|...
...ild output: " + s
end
}
# => "child output: foo\n"

opt ではエンコーディングの設定やプロセス起動のためのオプションが指定できます。
IO
.new や Kernel.#spawn で指定できるものと共通なので
詳しくはそちらを見てください。

@param en...

IO.popen(env, "-", mode = "r", opt={}) -> IO (21271.0)

第一引数に文字列 "-" が指定された時、fork(2) を 行い子プロセスの標準入出力との間にパイプラインを確立します。 親プロセスでは IO オブジェクトを返し、子プロセスでは nil を返します。

...プロセスでは IO オブジェクトを返し、子プロセスでは
nil を返します。

io
= IO.popen("-", "r+")
if io # parent
io
.puts "foo"
p io.gets # => "child output: foo\n"
io
.close
else # child
s = gets
print "child output: " + s
ex...
... IO オブジェクトを引数に
ブロックを実行し、その結果を返します。ブロックの実行後、生成したパイ
プは自動的にクローズされます。
子プロセスでは nil を引数にブロックを実行し終了します。

p IO.popen("-", "r+") {|io|...
...ild output: " + s
end
}
# => "child output: foo\n"

opt ではエンコーディングの設定やプロセス起動のためのオプションが指定できます。
IO
.new や Kernel.#spawn で指定できるものと共通なので
詳しくはそちらを見てください。

@param en...

IO.popen(env, "-", mode = "r", opt={}) {|io| ... } -> object (21271.0)

第一引数に文字列 "-" が指定された時、fork(2) を 行い子プロセスの標準入出力との間にパイプラインを確立します。 親プロセスでは IO オブジェクトを返し、子プロセスでは nil を返します。

...プロセスでは IO オブジェクトを返し、子プロセスでは
nil を返します。

io
= IO.popen("-", "r+")
if io # parent
io
.puts "foo"
p io.gets # => "child output: foo\n"
io
.close
else # child
s = gets
print "child output: " + s
ex...
... IO オブジェクトを引数に
ブロックを実行し、その結果を返します。ブロックの実行後、生成したパイ
プは自動的にクローズされます。
子プロセスでは nil を引数にブロックを実行し終了します。

p IO.popen("-", "r+") {|io|...
...ild output: " + s
end
}
# => "child output: foo\n"

opt ではエンコーディングの設定やプロセス起動のためのオプションが指定できます。
IO
.new や Kernel.#spawn で指定できるものと共通なので
詳しくはそちらを見てください。

@param en...

絞り込み条件を変える

<< 1 2 3 ... > >>