The double backslash is to escape an single backslash in a string. In this case it's just to have the backslash separator between the directory name and the file name.
The star *
is a wildcard character
, a character used to signify that 0 or more character should be present in place of the star character.
function searches for the filename you specify. If you specify a directory name without \*
, it will return the information about the directory. Since you want all the file in the directory, you use the wildcard to say that the file name is the directory name followed by a \
followed by 0 or more character.
You can be more precise: if you want to retrieve only .txt
files, you can use "\\*.txt". If you want file starting with "lib" and finishing with "debug" with any extension you could specify "\\lib*debug.*". Note that I didn't verify those but I expect them to work.