diff --git a/SabreTools.Helper/Objects/Dat/DatFile.cs b/SabreTools.Helper/Objects/Dat/DatFile.cs
index 81cb9962..fbed90a4 100644
--- a/SabreTools.Helper/Objects/Dat/DatFile.cs
+++ b/SabreTools.Helper/Objects/Dat/DatFile.cs
@@ -6257,21 +6257,26 @@ namespace SabreTools.Helper
#region Serialization
///
- /// Serialze the current object to file
+ /// Serialze object to file
///
- public static void Serialize(DatFile df)
+ /// DatFile to serialize
+ /// Name of the outputted file
+ public static string Serialize(DatFile df)
{
BinaryFormatter bf = new BinaryFormatter();
- Stream output = File.Open((String.IsNullOrEmpty(df.Name) ? "default" : df.Name) + ".bin", FileMode.Create);
+ string filename = (String.IsNullOrEmpty(df.Name) ? "default" : df.Name) + ".bin";
+ Stream output = File.Open(filename, FileMode.Create);
bf.Serialize(output, df);
output.Flush();
output.Dispose();
+ return filename;
}
///
- /// Repopulate the current object from a file
+ /// Repopulate object from a file
///
/// Name of the input file to populate from
+ /// DatFile populated from the input file
public static DatFile Deserialize(string input)
{
if (!File.Exists(input))