Upload
This commit is contained in:
commit
08fddcd73e
364 changed files with 111462 additions and 0 deletions
|
@ -0,0 +1,27 @@
|
|||
namespace PrometheOSPacker.Helpers
|
||||
{
|
||||
internal static class Utility
|
||||
{
|
||||
public static string GetAppFolder()
|
||||
{
|
||||
return AppDomain.CurrentDomain.BaseDirectory;
|
||||
}
|
||||
|
||||
public static string GetSlnFolder()
|
||||
{
|
||||
var directory = GetAppFolder();
|
||||
var files = Directory.GetFiles(directory, "*.sln");
|
||||
while (files.Length == 0)
|
||||
{
|
||||
var parentDirectoryInfo = Directory.GetParent(directory);
|
||||
if (parentDirectoryInfo == null)
|
||||
{
|
||||
throw new Exception("Unable to get parent directory.");
|
||||
}
|
||||
directory = parentDirectoryInfo.FullName;
|
||||
files = Directory.GetFiles(directory, "*.sln");
|
||||
}
|
||||
return directory;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue