A Find Utility
As a final example, we’ll use
file:read_file_info to make a general-purpose
The main entry point to this module is as follows:
lib_find:files(Dir, RegExp, Recursive, Fun, Acc0)
The arguments are as follows:
The directory name to start the file search in.
A shell-style regular expression to test the files we have found. If the files we encounter match this regular expression, then
Fun(File, Acc)will be called, where
Fileis the name of the file that matches the regular expression.
Recursive = true | false
A flag that determines whether search should recurse into the subdirectories of the current directory in the search path.
Fun(File, AccIn) -> AccOut
A function that is applied to the ...