DirectoryScanner constructor

const DirectoryScanner({
  1. bool includeHidden = false,
  2. bool followLinks = false,
  3. int? maxDepth,
  4. bool skip(
    1. FileSystemEntity entity
    )?,
  5. void onError(
    1. FileSystemException error
    )?,
})

Creates a scanner; the scan path is given later to scan, scanSync, or scanTree, so one scanner can be reused for many directories.

maxDepth must be null or non-negative; a negative value is reported as an ArgumentError when a scan starts, not here, so the constructor can stay const.

Implementation

const DirectoryScanner({
  this.includeHidden = false,
  this.followLinks = false,
  this.maxDepth,
  this.skip,
  this.onError,
});