/// <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)); }
public override string GetSize() { return(ByteSizeHelper.GetSize(DirectoryInfo.GetFiles("*", SearchOption.AllDirectories).Select(f => new FileObject(f).SizeInBytes.GetValueOrDefault(0)).Sum())); }