open static method
Implementation
static Future<NativeEagleSource> open(Directory root) async {
try {
if (!await root.exists()) {
throw EagleSourceException('Library root does not exist.');
}
final canonical = p.normalize(await root.resolveSymbolicLinks());
return NativeEagleSource._(Directory(canonical), canonical);
} on EagleSourceException {
rethrow;
} catch (error) {
throw EagleSourceException(
'Library root cannot be resolved.',
cause: error,
);
}
}