I have a List of string that contains files in which should be ignored for manipulating purposes. So I'm curious of how to handle the situation that has a wild card in it.
For example, the possible inputs in my List of String are:
C:\Windows\System32\bootres.dll
C:\Windows\System32\*.dll
The first example I think is easy to handle, I can just do a string equals check (ignoring case) to see if a file matches. However I am not sure how to determine if the given file may match the wild card expression in the list.
A little background into what I am doing. A user is allowed to copy a file to/from a location, however, if the file matches any file in my List of String I don't want to allow the copy.
There might be a must better approach to handling this.
The files I want to exclude are read in from a configuration file, and I receive the string value of the path that is attempting to be copied. Seems like I have all of the information I need to complete the task, it's just a matter of what is the best approach.