VirtualDirectory constructor

VirtualDirectory(
  1. Angel app,
  2. FileSystem fileSystem, {
  3. Directory? source,
  4. Iterable<String> indexFileNames = const ['index.html'],
  5. String publicPath = '/',
  6. dynamic callback(
    1. File file,
    2. RequestContext req,
    3. ResponseContext res
    )?,
  7. bool allowDirectoryListing = false,
  8. bool useBuffer = false,
})

Implementation

VirtualDirectory(this.app, this.fileSystem,
    {Directory? source,
    this.indexFileNames = const ['index.html'],
    this.publicPath = '/',
    this.callback,
    this.allowDirectoryListing = false,
    this.useBuffer = false}) {
  _prefix = publicPath.replaceAll(_straySlashes, '');
  if (source != null) {
    _source = source;
  } else {
    var dirPath = app.environment.isProduction ? './build/web' : './web';
    _source = fileSystem.directory(dirPath);
  }
}