method

open

open(path, mode = nil, perm = 0666, &b)
public

See IO.open when path is a file.

See Dir.open when path is a directory.