Browse files

df: variable name alignment

  • Loading branch information...
1 parent 2aa2d2e commit 47f6990b61e2e8484ec3358f9d7b9532bbff32f0 @bzzn bzzn committed Nov 11, 2011
Showing with 7 additions and 7 deletions.
  1. +3 −3 df/Df.cs
  2. +4 −4 df/DriveSummary.cs
View
6 df/Df.cs
@@ -18,15 +18,15 @@ public static int Main(string[] args)
var printFileSystemType = false;
var limitToType = "";
var excludeType = "";
- var usePosixFormat = false;
+ var posixFormat = false;
var opts = new OptionParser();
opts.Header = "Show information about the file system on which each FILE resides,\nor all file systems by deafult.";
opts.Args<string>("FILE", "").Do(files => { });
opts.On("human-readable", 'h', "print sizes in human readable format (e.g., 1K 234M 2G)").Do(() => humanReadable = true);
- opts.On("portability", 'P', "use the POSIX output format").Do(() => usePosixFormat = true);
+ opts.On("portability", 'P', "use the POSIX output format").Do(() => posixFormat = true);
opts.On("type", 't', "limit listing to file systems of type TYPE").WithArg<string>("TYPE").Do(arg => limitToType = arg );
opts.On("print-type", 'T', "print file system type").Do(() => printFileSystemType = true);
opts.On("exclude-type", 'x', "limit listing to file systems not of type TYPE").WithArg<string>("TYPE").Do(arg => excludeType = arg );
@@ -57,7 +57,7 @@ public static int Main(string[] args)
}
var drivesToEnumerate = GetDrives(limitToType, excludeType);
- var driveSummary = new DriveSummary(drivesToEnumerate, humanReadable, printFileSystemType, usePosixFormat);
+ var driveSummary = new DriveSummary(drivesToEnumerate, humanReadable, posixFormat, printFileSystemType);
Console.Write(driveSummary.Render());
return 0;
View
8 df/DriveSummary.cs
@@ -6,12 +6,12 @@ namespace NuTools.Df
{
public class DriveSummary
{
- public DriveSummary(IEnumerable<IDrive> drives, bool humanReadable, bool printFileSystemType, bool usePosixFormat)
+ public DriveSummary(IEnumerable<IDrive> drives, bool humanReadable, bool posixFormat, bool printFileSystemType)
{
this.drives = drives;
this.humanReadable = humanReadable;
+ this.posixFormat = posixFormat;
this.printFileSystemType = printFileSystemType;
- this.usePosixFormat = usePosixFormat;
columnNames = new [] { "Drive", "Type", "1K-blocks", "Used", "Available", "Use" };
}
@@ -29,7 +29,7 @@ public string Render()
columnNames[4] = "Avail";
}
- if (usePosixFormat)
+ if (posixFormat)
{
columnFormats.WithPosixFormat();
columnNames[2] = "1024-blocks";
@@ -150,6 +150,6 @@ private string BuildRowFrom(FormatDefinitions input)
private readonly string[] columnNames;
private readonly bool humanReadable;
private readonly bool printFileSystemType;
- private readonly bool usePosixFormat;
+ private readonly bool posixFormat;
}
}

0 comments on commit 47f6990

Please sign in to comment.