This module contains utilities on a higher level than the
The module supports Unicode file names, so that it will match against regular expressions given in Unicode and that it will find and process raw file names (i.e. files named in a way that does not confirm to the expected encoding).
If the VM operates in Unicode file naming mode on a machine with transparent file naming, the
For more information about raw file names, see the
The
Returns
The
The
If Unicode file name translation is in effect and the file
system is completely transparent, file names that cannot be
interpreted as Unicode may be encountered, in which case the
For more information about raw file names, see the
The
The
The
The
The
The wildcard string looks like an ordinary filename, except that certain "wildcard characters" are interpreted in a special way. The following characters are special:
Matches one character.
Matches any number of characters up to the end of the filename, the next dot, or the next slash.
Matches any of the characters listed. Two characters
separated by a hyphen will match a range of characters.
Example:
Alternation. Matches one of the alternatives.
Other characters represent themselves. Only filenames that have exactly the same character in the same position will match. (Matching is case-sensitive; i.e. "a" will not match "A").
Note that multiple "*" characters are allowed (as in Unix wildcards, but opposed to Windows/DOS wildcards).
Examples:
The following examples assume that the current directory is the top of an Erlang/OTP installation.
To find all
filelib:wildcard("lib/*/ebin/*.beam").
To find either
filelib:wildcard("lib/*/src/*.?rl")
or the following line
filelib:wildcard("lib/*/src/*.{erl,hrl}")
can be used.
To find all
filelib:wildcard("lib/*/{src,include}/*.hrl").
To find all
filelib:wildcard("lib/*/{src,include}/*.{erl,hrl}")
The