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.

atime 2

file.atime â time Instance Public methods Returns the last access time (a

2015-04-06 13:26:49
flock

file.flock(locking_constant) â 0 or false Instance Public methods Locks or

2015-04-06 13:50:30
ftype

File.ftype(file_name) â string Class Public methods Identifies the type of

2015-04-06 10:37:31
delete

File.delete(file_name, ...) â integer Class Public methods Deletes the named

2015-04-06 09:54:24
open

File.open(filename, mode="r" [, opt]) â fileFile.open(filename [, mode [, perm]] [, opt]) â fileFile.open(filename, mode="r"

2015-04-06 11:07:27
stat

File.stat(file_name) â stat Class Public methods Returns a File::Stat

2015-04-06 12:21:44
chown

File.chown(owner_int, group_int, file_name,... ) â integer Class Public methods Changes

2015-04-06 09:46:09
lchown

File.lchown(owner_int, group_int, file_name,..) â integer Class Public methods Equivalent

2015-04-06 10:49:08
new

File.new(filename, mode="r" [, opt]) â fileFile.new(filename [, mode [, perm]] [, opt]) â file

2015-04-06 11:04:07
truncate 2

file.truncate(integer) â 0 Instance Public methods Truncates file

2015-04-06 14:13:13