This module contains utilities on a higher level than the
This module does not support "raw" filenames (that is, files whose names do not comply with the expected encoding). Such files are ignored by the functions in this module.
For more information about raw filenames, see the
Ensures that all parent directories for the specified file or
directory name
Returns
Returns the size of the specified file.
Folds function
If Unicode filename translation is in effect and the file
system is transparent, filenames that cannot be
interpreted as Unicode can be encountered, in which case the
For more information about raw filenames, see the
Returns
Returns
Returns
Returns the date and time the specified file or directory was last
modified, or
Returns a list of all files that match Unix-style wildcard string
The wildcard string looks like an ordinary filename, except that the following "wildcard characters" are interpreted in a special way:
Matches one character.
Matches any number of characters up to the end of the filename, the next dot, or the next slash.
Two adjacent
Matches any of the characters listed. Two characters
separated by a hyphen 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 match. Matching is case-sensitive, for example, "a" does not match "A".
Notice 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
filelib:wildcard("lib/*/src/*.?rl")
filelib:wildcard("lib/*/src/*.{erl,hrl}")
To find all
filelib:wildcard("lib/*/{src,include}/*.hrl").
To find all
filelib:wildcard("lib/*/{src,include}/*.{erl,hrl}")
To find all
filelib:wildcard("lib/**/*.{erl,hrl}")
Same as
Looks for a file of the given name by applying suffix rules to
the given directory path. For example, a rule
If
Equivalent to
Applies file extension specific rules to find the source file for
a given object file relative to the object directory. For example,
for a file with the extension
If