23 lines
511 B
C#
23 lines
511 B
C#
using System;
|
|
using System.IO;
|
|
|
|
namespace org.budnhead.tools
|
|
{
|
|
public static class FileHelper
|
|
{
|
|
|
|
public static string findFile(string filename,string[] searchPaths){
|
|
foreach (string searchPath in searchPaths){
|
|
string fullname = String.Format("{0}{1}{2}",searchPath,Path.DirectorySeparatorChar,filename);
|
|
Console.WriteLine("lookupFile: {0}",fullname);
|
|
if (File.Exists(fullname)){
|
|
Console.WriteLine("foundFile: {0}",fullname);
|
|
return fullname;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
}
|
|
}
|