Changeset 1592
- Timestamp:
- 1/19/2010 2:51:56 AM (3 years ago)
- File:
-
- 1 edited
-
branches/eraser6/CodeReview/Eraser.Util/File.cs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/CodeReview/Eraser.Util/File.cs
r1584 r1592 269 269 /// <returns>A string containing the file size and the associated unit. 270 270 /// Files larger than 1MB will be accurate to 2 decimal places.</returns> 271 public static string GetHumanReadableFile size(long bytes)271 public static string GetHumanReadableFileSize(long bytes) 272 272 { 273 273 //List of units, in ascending scale … … 285 285 for (int i = 0; i != units.Length; ++i) 286 286 { 287 if (dBytes < 10 20.0)287 if (dBytes < 1000.0) 288 288 if (i <= 1) 289 289 return string.Format(CultureInfo.CurrentCulture, … … 318 318 } 319 319 320 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "1#")] 321 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#")] 322 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "3#")] 320 323 public static void GetFileTime(SafeFileHandle file, out DateTime creationTime, 321 324 out DateTime accessedTime, out DateTime modifiedTime)
Note: See TracChangeset
for help on using the changeset viewer.
