budnhead/org.niclasundharald.engine/FileHelper.cs

23 lines
519 B
C#
Raw Normal View History

2017-05-01 01:33:33 +02:00
using System;
using System.IO;
namespace org.niclasundharald.engine
{
public static class FileHelper
{
public static string findFile(string filename,string[] searchPaths){
foreach (string searchPath in searchPaths){
2017-05-04 23:57:00 +02:00
string fullname = String.Format("{0}{1}{2}",searchPath,Path.DirectorySeparatorChar,filename);
Console.WriteLine("lookupFile: {0}",fullname);
2017-05-01 01:33:33 +02:00
if (File.Exists(fullname)){
2017-05-04 23:57:00 +02:00
Console.WriteLine("foundFile: {0}",fullname);
2017-05-01 01:33:33 +02:00
return fullname;
}
}
return null;
}
}
}