FileSort constructor

FileSort(
  1. String inputPath,
  2. String outputPath,
  3. List<Column> columns,
  4. String? fieldDelimiter,
  5. String? lineDelimiter, {
  6. bool? verbose = false,
})

Sort the file at inputPath and save the results to outputPath _inputPath is the path to the file to be sorted _outputPath is the path to write the sorted file to. _columns is used to describe the sort order to be applied to the selected columns. _fieldDelimiter is the delimiter to be used to separate each line of the file into columns. _lineDelimiter is the delimiter to be used to separate each line. verbose caused FileSort to log debug level information as it sorts.

Implementation

FileSort(String inputPath, String outputPath, List<Column> columns,
    String? fieldDelimiter, String? lineDelimiter,
    {this.verbose = false})
    : _inputPath = inputPath,
      _outputPath = outputPath,
      _columns = columns,
      _fieldDelimiter = fieldDelimiter,
      _lineDelimiter = lineDelimiter {
  for (final column in _columns) {
    if (_maxColumn! < column.ordinal!) {
      _maxColumn = column.ordinal;
    }
  }
}