enum

File::MatchOptions

Inherits Enum / Comparable / Value / Object

Options used to control the behavior of Dir.glob.

Constants

DotFiles = 1

Includes files whose name begins with a period (.).

NativeHidden = 2

Includes files which have a hidden attribute backed by the native filesystem.

On Windows, this matches files that have the NTFS hidden attribute set. This option alone doesn't match files with both the hidden and the system attributes, OSHidden must also be used.

On other systems, this has no effect.

OSHidden = 4

Includes files which are considered hidden by operating system conventions (apart from DotFiles), but not by the filesystem.

On Windows, this option alone has no effect. However, combining it with NativeHidden matches files that have both the NTFS hidden and system attributes set. Note that files with just the system attribute, but not the hidden attribute, are always matched regardless of this option or NativeHidden.

On other systems, this has no effect.

None = 0
All = 7

Class methods

glob_default

Returns a suitable platform-specific default set of options for Dir.glob and Dir.[].

Currently this is always NativeHidden | OSHidden.

Source

Instance methods

dot_files?

Returns true if this enum value contains DotFiles

Source
native_hidden?

Returns true if this enum value contains NativeHidden

Source
none?
Source
os_hidden?

Returns true if this enum value contains OSHidden

Source