StaticFiles constructor
StaticFiles(})
Constructor
Requests for a directory (i.e. path ending in "/")
returns one of the defaultFilenames
in the directory (if it is set and
a file exists), otherwise if allowDirectoryListing
is true
a listing of the directory is produced, otherwise an exception is thrown.
The defaultFilenames
default to standardFilenames, if not specified.
Implementation
StaticFiles(String baseDir,
{this.defaultFilenames = standardFilenames,
this.allowFilePathsAsDirectories = true,
this.allowDirectoryListing = false,
this.publicServerUrl = ''})
: _baseDir = _checkAndFixBaseDir(baseDir);