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?(".")

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.

ctime

File.ctime(file_name) â time Class Public methods Returns the change time for the named file (the time at which directory information about the file was changed, not the file itself). file_name can be an IO object. Note that on Windows (NTFS), returns creation time (birth time). File.ctime("testfile") #=> Wed Apr 09 08:53:13 CDT 2003

chown

File.chown(owner_int, group_int, file_name,... ) â integer Class Public methods Changes the owner and group of the named file(s) to the given numeric owner and group id's. Only a process with superuser privileges may change the owner of a file. The current owner of a file may change the file's group to any group to which the owner belongs. A nil or -1 owner or group id is ignored. Returns the number of files processed. File.chown(nil, 100, "testfile")

chmod

File.chmod(mode_int, file_name, ... ) â integer Class Public methods Changes permission bits on the named file(s) to the bit pattern represented by mode_int. Actual effects are operating system dependent (see the beginning of this section). On Unix systems, see chmod(2) for details. Returns the number of files processed. File.chmod(0644, "testfile", "out") #=> 2

chardev?

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

blockdev?

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

basename

File.basename(file_name [, suffix] ) â base_name Class Public methods Returns the last component of the filename given in file_name, which can be formed using both File::SEPARATOR and File::ALT_SEPARETOR as the separator when File::ALT_SEPARATOR is not nil. If suffix is given and present at the end of file_name, it is removed. File.basename("/home/gumby/work/ruby.rb") #=> "ruby.rb" File.basename("/home/gumby/work/ruby.rb", ".rb") #=> "ruby"

atime

File.atime(file_name) â time Class Public methods Returns the last access time for the named file as a Time object). file_name can be an IO object. File.atime("testfile") #=> Wed Apr 09 08:51:48 CDT 2003

absolute_path

File.absolute_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. If the given pathname starts with a â~'' it is NOT expanded, it is treated as a normal directory name. File.absolute_path("~oracle/bin") #=> "<relative_path>/~oracle/bin"