delete

File.delete(file_name, ...) â integer Class Public methods Deletes the named files, returning the number of names passed as arguments. Raises an exception on any error. See also Dir::rmdir.

directory?

File.directory?(file_name) â true or false Class Public methods Returns true if the named file is a directory, or a symlink that points at a directory, and false otherwise. file_name can be an IO object. File.directory?(".")

dirname

File.dirname(file_name) â dir_name Class Public methods Returns all components of the filename given in file_name except the last one. The filename can be formed using both File::SEPARATOR and File::ALT_SEPARETOR as the separator when File::ALT_SEPARATOR is not nil. File.dirname("/home/gumby/work/ruby.rb") #=> "/home/gumby/work"

executable?

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

executable_real?

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

exist?

File.exist?(file_name) â true or false Class Public methods Return true if the named file exists. file_name can be an IO object. âfile existsâ means that stat() or fstat() system call is successful.

exists?

File.exists?(file_name) â true or false Class Public methods Return true if the named file exists. file_name can be an IO object. âfile existsâ means that stat() or fstat() system call is successful.

expand_path

File.expand_path(file_name [, dir_string] ) â abs_file_name Class Public methods Converts a pathname to an absolute pathname. Relative paths are referenced from the current working directory of the process unless dir_string is given, in which case it will be used as the starting point. The given pathname may start with a â~'', which expands to the process owner's home directory (the environment variable HOME must be set correctly). â~user'' expands to the named user's home direc

extname

File.extname(path) â string Class Public methods Returns the extension (the portion of file name in path starting from the last period). If path is a dotfile, or starts with a period, then the starting dot is not dealt with the start of the extension. An empty string will also be returned when the period is the last character in path. File.extname("test.rb") #=> ".rb" File.extname("a/b/d/test.rb") #=> ".rb" File.extname("foo.") #=> "" File.extname("

file?

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