Skip to content

Commit

Permalink
3.2 tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
rmscheller committed Mar 27, 2024
1 parent 31da40d commit 7b49d95
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Binary file modified deploy/installer/LANDIS-II-V7 Base Wind 3.2-setup.exe
Binary file not shown.
21 changes: 20 additions & 1 deletion src/MetadataHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Landis.Library.Metadata;
using Landis.Utilities;
using Landis.Core;
using System.IO;

namespace Landis.Extension.BaseWind
{
Expand Down Expand Up @@ -32,6 +33,9 @@ public static void InitializeMetadata(int Timestep, string MapFileName, string s
// table outputs:
//---------------------------------------

CreateDirectory(eventLogFileName);
CreateDirectory(summaryLogFileName);

PlugIn.eventLog = new MetadataTable<EventsLog>(eventLogFileName);
PlugIn.summaryLog = new MetadataTable<SummaryLog>(summaryLogFileName);

Expand Down Expand Up @@ -76,9 +80,24 @@ public static void InitializeMetadata(int Timestep, string MapFileName, string s
MetadataProvider mp = new MetadataProvider(Extension);
mp.WriteMetadataToXMLFile("Metadata", Extension.Name, Extension.Name);

}

public static void CreateDirectory(string path)
{
//Require.ArgumentNotNull(path);
path = path.Trim(null);
if (path.Length == 0)
throw new ArgumentException("path is empty or just whitespace");
//throw new Exception(path);
string dir = Path.GetDirectoryName(path);
if (!string.IsNullOrEmpty(dir))
{
Landis.Utilities.Directory.EnsureExists(dir);
}


//return new StreamWriter(path);
return;
}

}
}

0 comments on commit 7b49d95

Please sign in to comment.