Example #1
0
 /// <summary>
 /// Gets the file size display.
 /// </summary>
 /// <returns>System.String.</returns>
 public override long?GetSize(SizeUnits sizeUnits)
 {
     // RefreshObject();
     if (FileInfo?.Length == null)
     {
         return(null);
     }
     return(ByteSizeHelper.GetSize(FileInfo.Length, sizeUnits));
 }
Example #2
0
 public override string GetSize()
 {
     return(ByteSizeHelper.GetSize(DirectoryInfo.GetFiles("*", SearchOption.AllDirectories).Select(f => new FileObject(f).SizeInBytes.GetValueOrDefault(0)).Sum()));
 }