Type:
Class
Constants:
Separator : separator
SEPARATOR : separator
ALT_SEPARATOR : rb_obj_freeze(rb_usascii_str_new2(file_alt_separator))
PATH_SEPARATOR : rb_obj_freeze(rb_str_new2(PATH_SEP))

A File is an abstraction of any file object accessible by the program and is closely associated with class IO File includes the methods of module FileTest as class methods, allowing you to write (for example) File.exist?("foo").

In the description of File methods, permission bits are a platform-specific set of bits that indicate permissions of a file. On Unix-based systems, permissions are viewed as a set of three octets, for the owner, the group, and the rest of the world. For each of these entities, permissions may be set to read, write, or execute the file:

The permission bits 0644 (in octal) would thus be interpreted as read/write for owner, and read-only for group and other. Higher-order bits may also be used to indicate the type of file (plain, directory, pipe, socket, and so on) and various other special features. If the permissions are for a directory, the meaning of the execute bit changes; when set the directory can be searched.

On non-Posix operating systems, there may be only the ability to make a file read-only or read-write. In this case, the remaining permission bits will be synthesized to resemble typical values. For instance, on Windows NT the default permission bits are 0644, which means read/write for owner, read-only for all others. The only change that can be made is to make the file read-only, which is reported as 0444.

exists?

File.exists?(file_name) â true or false Class Public methods Return true

2015-04-06 10:06:35
realpath

File.realpath(pathname [, dir_string]) â real_pathname Class Public methods Returns

2015-04-06 11:37:07
writable?

File.writable?(file_name) â true or false Class Public methods Returns true

2015-04-06 13:14:12
realdirpath

File.realdirpath(pathname [, dir_string]) â real_pathname Class Public methods Returns

2015-04-06 11:33:40
truncate

File.truncate(file_name, integer) â 0 Class Public methods Truncates the file

2015-04-06 12:42:55
chown 2

file.chown(owner_int, group_int ) â 0 Instance Public methods Changes the

2015-04-06 13:38:44
symlink

File.symlink(old_name, new_name) â 0 Class Public methods Creates a symbolic

2015-04-06 12:33:55
link

File.link(old_name, new_name) â 0 Class Public methods Creates a new name

2015-04-06 10:54:58
join

File.join(string, ...) â path Class Public methods Returns a new string formed

2015-04-06 10:44:26
pipe?

File.pipe?(file_name) â true or false Class Public methods Returns true

2015-04-06 11:14:03