public static string ToString(this FileInfo f, string format, int fractionalDigits) { return(FileSizeConverter.GetFileSizeString(f.Length, format, fractionalDigits)); }
public static string ToString(this DirectoryInfo d, string format, int fractionalDigits) { double fileSize = GetDirectorySize(d); return(FileSizeConverter.GetFileSizeString(fileSize, format, fractionalDigits)); }