mtime

File.mtime(file_name) â time Class Public methods Returns the modification time for the named file as a Time object. file_name can be an IO object. File.mtime("testfile") #=> Tue Apr 08 12:58:04 CDT 2003

new

File.new(filename, mode="r" [, opt]) â fileFile.new(filename [, mode [, perm]] [, opt]) â file Class Public methods Opens the file named by filename according to the given mode and returns a new File object. See IO.new for a description of mode and opt. If a file is being created, permission bits may be given in perm. These mode and permission bits are platform dependent; on Unix systems, see open(2) and chmod(2) man pages for details. Examples f = File.new("testfil

open

File.open(filename, mode="r" [, opt]) â fileFile.open(filename [, mode [, perm]] [, opt]) â fileFile.open(filename, mode="r" [, opt]) {|file| block } â objFile.open(filename [, mode [, perm]] [, opt]) {|file| block } â obj Class Public methods With no associated block, File.open is a synonym for ::new. If the optional code block is given, it will be passed the opened file as an argument and the File object will automatically be closed when the block termina

owned?

File.owned?(file_name) â true or false Class Public methods Returns true if the named file exists and the effective used id of the calling process is the owner of the file. file_name can be an IO object.

path

File.path(path) â string Class Public methods Returns the string representation of the path File.path("/dev/null") #=> "/dev/null" File.path(Pathname.new("/tmp")) #=> "/tmp"

pipe?

File.pipe?(file_name) â true or false Class Public methods Returns true if the named file is a pipe. file_name can be an IO object.

readable?

File.readable?(file_name) â true or false Class Public methods Returns true if the named file is readable by the effective user id of this process.

readable_real?

File.readable_real?(file_name) â true or false Class Public methods Returns true if the named file is readable by the real user id of this process.

readlink

File.readlink(link_name) â file_name Class Public methods Returns the name of the file referenced by the given link. Not available on all platforms. File.symlink("testfile", "link2test") #=> 0 File.readlink("link2test") #=> "testfile"

realdirpath

File.realdirpath(pathname [, dir_string]) â real_pathname Class Public methods Returns the real (absolute) pathname of pathname in the actual filesystem. The real pathname doesn't contain symlinks or useless dots. If dir_string is given, it is used as a base directory for interpreting relative pathname instead of the current directory. The last component of the real pathname can be nonexistent.