public static string CreateDirInRootApp(string dir, int parentUpLevel = 0) { string path = DirNameConstructor.GetAbsoluteDirPath(dir, parentUpLevel); Directory.CreateDirectory(path); return(path); }
/// <summary>2018-07-17 - 18:29 /// Create dir in root of appicaliton (System.Reflection.Assembly.GetExecutingAssembly().Location;) /// </summary> /// <param name="inDirName"></param> /// <returns>full apsolut apth to new dir. null if something wronw </returns> public static string GetCreateDirInRootApp(string inDirName, int parentUpLevel = 0) { try { string pathCombination = DirNameConstructor.GetAbsoluteDirPath(inDirName, parentUpLevel); if (Directory.Exists(pathCombination) == false) { Directory.CreateDirectory(pathCombination); } return(pathCombination); } catch (Exception e) { throw e; } }