From 40330d00070ec6e203df25165c07bf965cd650b4 Mon Sep 17 00:00:00 2001 From: Austin Noska Date: Wed, 28 Apr 2021 16:16:59 -0400 Subject: [PATCH] feat: Add method to IcdFile for getting the length in bytes of a specified file --- ICD.Common.Utils/IO/IcdFile.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ICD.Common.Utils/IO/IcdFile.cs b/ICD.Common.Utils/IO/IcdFile.cs index 890a64b..a188171 100644 --- a/ICD.Common.Utils/IO/IcdFile.cs +++ b/ICD.Common.Utils/IO/IcdFile.cs @@ -98,6 +98,12 @@ namespace ICD.Common.Utils.IO return File.GetCreationTime(path); } + [PublicAPI] + public static long GetLength(string path) + { + return new FileInfo(path).Length; + } + [PublicAPI] public static IcdFileStream Create(string path) {