public static string GetDubFilePath(AbstractDProject @base, string subPath) { var sub = @base as DubSubPackage; if (sub != null) { sub.useOriginalBasePath = true; } var packageDir = @base.GetAbsPath(Building.ProjectBuilder.EnsureCorrectPathSeparators(subPath)); if (sub != null) { sub.useOriginalBasePath = false; } string dubFileToLoad; if (File.Exists(dubFileToLoad = Path.Combine(packageDir, PackageJsonFile)) || File.Exists(dubFileToLoad = Path.Combine(packageDir, DubJsonFile)) || File.Exists(dubFileToLoad = Path.Combine(packageDir, DubSdlFile))) { return(dubFileToLoad); } return(string.Empty); }
public static string GetDubJsonFilePath(AbstractDProject @base,string subPath) { var sub = @base as DubSubPackage; if (sub != null) sub.useOriginalBasePath = true; var packageDir = @base.GetAbsPath(Building.ProjectBuilder.EnsureCorrectPathSeparators(subPath)); if(sub != null) sub.useOriginalBasePath = false; string packageJsonToLoad; if (File.Exists (packageJsonToLoad = Path.Combine (packageDir, PackageJsonFile)) || File.Exists (packageJsonToLoad = Path.Combine (packageDir, DubJsonFile))) return packageJsonToLoad; return null; }
public static string FindTraceLogFileName(AbstractDProject project) { if (project == null) { return(null); } var file = project.GetAbsPath(trace_log); if (File.Exists(file)) { return(file); } file = project.GetOutputFileName(Ide.IdeApp.Workspace.ActiveConfiguration).ParentDirectory.Combine(trace_log); if (File.Exists(file)) { return(file); } return(null); }