watchRecursive method
void
watchRecursive({
- required void onData(
- FileSystemEvent fileSystemEvent
- bool recursive = false,
- bool followLinks = true,
watch recursive
Implementation
void watchRecursive({
required void Function(FileSystemEvent fileSystemEvent) onData,
bool recursive = false,
bool followLinks = true,
}) {
local_sort();
for (var i = 0; i < length; i++) {
FileSystemEntity fileSystemEntity = this[i];
if (fileSystemEntity is Directory) {
String base_name = path.basename(fileSystemEntity.uri.toFilePath());
if (RegExp(r"^([.])", caseSensitive: false).hasMatch(base_name)) {
if ([".github", ".idea"].contains(base_name) == false) {
continue;
}
}
fileSystemEntity.watch().listen(onData);
fileSystemEntity.listSync().watchRecursive(onData: onData);
} else {}
}
return;
}