Пример #1
0
 public static string ToString(this FileInfo f, string format, int fractionalDigits)
 {
     return(FileSizeConverter.GetFileSizeString(f.Length, format, fractionalDigits));
 }
Пример #2
0
    public static string ToString(this DirectoryInfo d, string format, int fractionalDigits)
    {
        double fileSize = GetDirectorySize(d);

        return(FileSizeConverter.GetFileSizeString(fileSize, format, fractionalDigits));
    }