diff --git a/ICD.Common.Utils/Extensions/AssemblyExtensions.cs b/ICD.Common.Utils/Extensions/AssemblyExtensions.cs
index 6e260da..3a67c37 100644
--- a/ICD.Common.Utils/Extensions/AssemblyExtensions.cs
+++ b/ICD.Common.Utils/Extensions/AssemblyExtensions.cs
@@ -20,7 +20,7 @@ namespace ICD.Common.Utils.Extensions
public static string GetPath(this Assembly extends)
{
if (extends == null)
- throw new ArgumentNullException();
+ throw new ArgumentNullException("extends");
string path = extends
#if SIMPLSHARP
@@ -43,5 +43,19 @@ namespace ICD.Common.Utils.Extensions
return IcdFile.Exists(path) ? path : null;
}
+
+ ///
+ /// Gets the creation date of the given assembly.
+ ///
+ ///
+ ///
+ public static DateTime GetCreationTime(this Assembly extends)
+ {
+ if (extends == null)
+ throw new ArgumentNullException("extends");
+
+ string path = extends.GetPath();
+ return path == null ? DateTime.MinValue : IcdFile.GetCreationTime(path);
+ }
}
}
diff --git a/ICD.Common.Utils/IO/IcdFile.cs b/ICD.Common.Utils/IO/IcdFile.cs
index 32e35d5..7c8bdc0 100644
--- a/ICD.Common.Utils/IO/IcdFile.cs
+++ b/ICD.Common.Utils/IO/IcdFile.cs
@@ -77,5 +77,11 @@ namespace ICD.Common.Utils.IO
{
return new IcdFileStream(File.Open(path, mode));
}
+
+ [PublicAPI]
+ public static DateTime GetCreationTime(string path)
+ {
+ return File.GetCreationTime(path);
+ }
}
}