460件ヒット
[401-460件を表示]
(0.145秒)
クラス
-
ARGF
. class (2) - Dir (107)
- File (98)
- IO (253)
キーワード
- atime (11)
- birthtime (10)
- children (6)
- chmod (11)
- chown (11)
- clone (11)
-
close
_ read (11) -
close
_ write (11) - ctime (11)
- dup (11)
- each (22)
-
each
_ child (12) - eof (11)
- eof? (11)
- fcntl (11)
- fileno (21)
- flock (11)
- ioctl (11)
- lstat (11)
- mtime (11)
- pid (11)
- pos (22)
- read (11)
- readpartial (11)
- reopen (33)
- rewind (22)
- seek (22)
- size (11)
- stat (11)
- sync= (11)
- sysseek (11)
- tell (22)
-
to
_ i (11)
検索結果
先頭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
end
//}... -
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
else
$stderr.puts "In child, pid is #{$$}" # => In child, pid is 16013
end
end
//}... -
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
end
//}... -
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
end
//}
@see File#lstat, File.stat, File.lstat... -
IO
# sync=(newstate) (8115.0) -
自身を同期モードに設定すると、出力関数の呼出毎にバッファがフラッシュされます。
...自身を同期モードに設定すると、出力関数の呼出毎にバッファがフラッシュされます。
@param newstate 自身を同期モードに設定するかを boolean で指定します。
@raise IOError 既に close されていた場合に発生します。
@see IO#sync...