Imagine a directory with these files/folders: file_foo, file_bar, folder_a, folder, b
I need to search within this folder for a file which is named something with "foo". In bash
I would normally do this by:
FOO_FILES=$(find . -name "*foo*")
How to check if file exists using wildcard * in Erlang?
Possible Soultions:
file:list:dir
to list the directories files/folders and then iterate oder the list using a regurlar expression matching my search pattern? Or is there a simpler way to do so?file:path_eval("D:/myFolder", "*foo*")
but this did not work.You should use filelib:wildcard/1,2