rename

File.rename(old_name, new_name) â 0 Class Public methods Renames the given file to the new name. Raises a SystemCallError if the file cannot be renamed. File.rename("afile", "afile.bak") #=> 0

realpath

File.realpath(pathname [, dir_string]) â real_pathname Class Public methods Returns the real (absolute) pathname of pathname in the actual filesystem not containing 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. All components of the pathname must exist when this method is called.

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.

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"

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.

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.

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.

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"

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.

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