FileList constructor
FileList(})
Creates file list.
Parameters:
directory
Directory whic will be listed.
pattern
Glob pattern of this file list.
caseSensitive
True, if the pattern is case sensitive; otherwise false.
notify
Function that is called whenever an item is added.
Implementation
FileList(this.directory, String pattern,
{bool? caseSensitive, void Function(String path)? notify}) {
if (caseSensitive == null) {
if (_isWindows) {
caseSensitive = false;
} else {
caseSensitive = true;
}
}
_caseSensitive = caseSensitive;
_notify = notify;
_pattern = FilePath.expand(pattern);
_files = _getFiles();
}