-spec patsubst(filename_pattern(),
file:filename_all(),
template_vars()) -> file:filename_all().
A special version of ‘template/3’ for manipulating file names. It automatically adds the following substitutions:
extension equal to the file extension of argument Src
basename equal to the basename of Src without the extension
dirname directory of Src
Example:
patsubst("${profile}/ebin/${basename}.beam", "src/foo.erl", #{profile => <<"debug">>}) ->
<<"debug/ebin/foo.beam">>