File::Constants provides file-related constants. All possible file constants are listed in the documentation but they may not all be present on your platform.

If the underlying platform doesn't define a constant the corresponding Ruby constant is not defined.

Your platform documentations (e.g. man open(2)) may describe more detailed information.

Constants
FNM_NOESCAPE = INT2FIX(FNM_NOESCAPE)
 

Disables escapes in File.fnmatch and Dir.glob patterns

FNM_PATHNAME = INT2FIX(FNM_PATHNAME)
 

Wildcards in File.fnmatch and Dir.glob patterns do not match directory separators

FNM_DOTMATCH = INT2FIX(FNM_DOTMATCH)
 

The '*' wildcard matches filenames starting with “.” in File.fnmatch and Dir.glob patterns

FNM_CASEFOLD = INT2FIX(FNM_CASEFOLD)
 

Makes File.fnmatch patterns case insensitive (but not Dir.glob patterns).

FNM_EXTGLOB = INT2FIX(FNM_EXTGLOB)
 

Allows file globbing through “{a,b}” in File.fnmatch patterns.

FNM_SYSCASE = INT2FIX(FNM_SYSCASE)
 

System default case insensitiveness, equals to FNM_CASEFOLD or 0.

FNM_SHORTNAME = INT2FIX(FNM_SHORTNAME)
 

Makes patterns to match short names if existing. Valid only on Microsoft Windows.

RDONLY = INT2FIX(O_RDONLY)
 

open for reading only

WRONLY = INT2FIX(O_WRONLY)
 

open for writing only

RDWR = INT2FIX(O_RDWR)
 

open for reading and writing

APPEND = INT2FIX(O_APPEND)
 

append on each write

CREAT = INT2FIX(O_CREAT)
 

create file if it does not exist

EXCL = INT2FIX(O_EXCL)
 

error if CREAT and the file exists

NONBLOCK = INT2FIX(O_NONBLOCK)
 

do not block on open or for data to become available

TRUNC = INT2FIX(O_TRUNC)
 

truncate size to 0

NOCTTY = INT2FIX(O_NOCTTY)
 

not to make opened IO the controlling terminal device

BINARY = INT2FIX(O_BINARY)
 

disable line code conversion

SHARE_DELETE = INT2FIX(O_SHARE_DELETE)
 

can delete opened file

SYNC = INT2FIX(O_SYNC)
 

any write operation perform synchronously

DSYNC = INT2FIX(O_DSYNC)
 

any write operation perform synchronously except some meta data

RSYNC = INT2FIX(O_RSYNC)
 

any read operation perform synchronously. used with SYNC or DSYNC.

NOFOLLOW = INT2FIX(O_NOFOLLOW)
 

do not follow symlinks

NOATIME = INT2FIX(O_NOATIME)
 

do not change atime

DIRECT = INT2FIX(O_DIRECT)
 

Try to minimize cache effects of the I/O to and from this file.

TMPFILE = INT2FIX(O_TMPFILE)
 

Create an unnamed temporary file

LOCK_SH = INT2FIX(LOCK_SH)
 

shared lock. see File#flock

LOCK_EX = INT2FIX(LOCK_EX)
 

exclusive lock. see File#flock

LOCK_UN = INT2FIX(LOCK_UN)
 

unlock. see File#flock

LOCK_NB = INT2FIX(LOCK_NB)
 

non-blocking lock. used with LOCK_SH or LOCK_EX. see File#flock

NULL = rb_obj_freeze(rb_usascii_str_new2(null_device))
 

Name of the null device