areFSEntiesExist function
Check if give File or Directory exists at the give paths
,
if not returns the failed FileSystemEntity path
Implementation
String? areFSEntiesExist(List<String> paths) {
for (final path in paths) {
// Using the sync method here due to `avoid_slow_async_io` lint suggestion.
final fsType = FileSystemEntity.typeSync(path);
if (![FileSystemEntityType.directory, FileSystemEntityType.file]
.contains(fsType)) {
return path;
}
}
return null;
}