This module contains utilities on a higher level than the
filename() = string() | atom() | DeepList
dirname() = filename()
DeepList = [char() | atom() | DeepList]
The
Returns
The
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