Ruby I/O at a Glance
See notes at bottom.

IO class methods

foreach new pipe popen readlines select
File class methods

atime basename chmod chown ctime delete dirname
expand_path ftype join link lstat mtime new
open readlink rename size split stat symlink
truncate umask unlink utime
IO instance methods

<< binmode clone close
close_read close_write closed? each
each_byte each_line eof eof?
fcntl fileno flush getc
gets ioctl isatty lineno
lineno= pid pos pos=
print printf putc puts
read readchar readline readlines
reopen rewind seek stat
sync sync= sysread syswrite
tell to_i to_io tty?
ungetc write
File instance methods

atime chmod chown
ctime flock lstat
mtime path truncate
Mixed in from FileTest

blockdev? chardev? directory?
executable? executable_real? exist?
exists? file? grpowned?
owned? pipe? readable?
readable_real? setgid? setuid?
size size? socket?
sticky? symlink? writable?
writable_real? zero?
File::Stat instance methods (in stat, lstat)

<=> atime blksize blockdev? blocks chardev? ctime dev directory?
executable? executable_real? file? ftype gid grpowned? ino mode mtime
nlink owned? pipe? rdev readable? readable_real? setgid? setuid? size
size? socket? sticky? symlink? uid writable? writable_real? zero?

  • Methods appearing in boldface are not defined anywhere else; the others are defined in more than one class or module.
  • The top row is for class methods; the middle row is for instance methods; and the third row is for methods belonging to File::Stat objects such as those returned by stat and lstat.
  • Some changes may have occurred since this table was prepared; it should be correct for version 1.6.2 of Ruby.

Hits since May 2002: