HashedFiles constructor

HashedFiles(
  1. String dir, {
  2. String ext = 'bin',
})

The files in dir, each named <sha256>.<ext>.

Implementation

HashedFiles(String dir, {this.ext = 'bin'})
  : dir = dir.replaceAll(r'\', '/') {
  if (!RegExp(r'^[a-z0-9]{1,8}$').hasMatch(ext)) {
    throw ArgumentError.value(ext, 'ext', 'Not a file extension.');
  }
}