exists function
checks if the given path
exists.
Throws ArgumentError if path
is an empty string.
Implementation
bool exists(String path, {bool followLinks = true}) {
if (path.isEmpty) {
throw ArgumentError('path must not be empty.');
}
final exists = FileSystemEntity.typeSync(path, followLinks: followLinks) !=
FileSystemEntityType.notFound;
return exists;
}