るりまサーチ

最速Rubyリファレンスマニュアル検索!
460件ヒット [401-460件を表示] (0.145秒)

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

クラス

キーワード

検索結果

<< < ... 3 4 5 >>

IO#fcntl(cmd, arg = 0) -> Integer (8115.0)

IOに対してシステムコール fcntl を実行します。 機能の詳細は fcntl(2) を参照してください。 fcntl(2) が返した整数を返します。

...文字列、booleanのいずれかで指定します。
整数の時にはその値を fcntl(2) に渡します。
文字列の場合には Array#pack した構造体だとみなして渡します。
arg が nil か false の場合には 0を、true の場合には 1...
...

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

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

//emlist[例][ruby]{
require "fcntl"

IO.write("testfile", "abcde")
# ファイル状態フラグを読み出す
File.open("testfile") do |f|
f...
....fcntl(Fcntl::F_GETFL, 0) # => 0
f.fcntl(Fcntl::F_SETFL, Fcntl::O_NONBLOCK) # => 0
f.fcntl(Fcntl::F_GETFL, 0) # => 4
e
nd
//}...

IO#ioctl(cmd, arg = 0) -> Integer (8115.0)

IO に対してシステムコール ioctl を実行し、その結果を返します。 機能の詳細は ioctl(2) を参照してください。

...値を ioctl に渡します。
文字列の場合には Array#pack した構造体だとみなして渡します。
arg が nil か false の場合には 0を、true の場合には 1 を渡します。

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

IO#pid -> Integer | nil (8115.0)

自身が IO.popen で作られたIOポートなら、子プロセスのプロセス ID を 返します。それ以外は nil を返します。

...IO.popen で作られたIOポートなら、子プロセスのプロセス ID を
返します。それ以外は nil を返します。

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

//emlist[例][ruby]{
IO.popen("-") do |pipe|
if pipe
$stderr.puts "In parent, child...
...pid is #{pipe.pid}" # => In parent, child pid is 16013
e
lse
$stderr.puts "In child, pid is #{$$}" # => In child, pid is 16013
e
nd
e
nd
//}...

IO#pos -> Integer (8115.0)

ファイルポインタの現在の位置を整数で返します。

...タの現在の位置を整数で返します。

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

//emlist[例][ruby]{
IO.write("testfile", "This is line one\n")
File.open("testfile") do |f|
f.pos # => 0
f.gets # => "This is line one\n"
f.pos # => 17
e
nd
//}...

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

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

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

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

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

//emlist[例][ruby]{
IO.write("testfile", "This is line one\nThis is line...
...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
e
nd
//}

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

絞り込み条件を変える

IO#sync=(newstate) (8115.0)

自身を同期モードに設定すると、出力関数の呼出毎にバッファがフラッシュされます。

...自身を同期モードに設定すると、出力関数の呼出毎にバッファがフラッシュされます。

@param newstate 自身を同期モードに設定するかを boolean で指定します。

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

@see IO#sync...
<< < ... 3 4 5 >>