So i have this function
public bool FileExists(string path, string filename)
{
string fullPath = Path.Combine(path, "pool");
string[] results = System.IO.Directory.GetFiles(fullPath, filename, SearchOption.AllDirectories);
return (results.Length == 0 ? false : true);
}
And it returns true or false on whether a file is found in a directory and all its subdirectories...But i want to pass the string location as well
Here is how i call it
if (FileExists(location, attr.link))
{
FileInfo f = new FileInfo("string the file was found");
Any ideas on how to achieve this? Maybe change to a list or array ...any ideas