rootPackageDirectoryForMainIsolate method
Returns the root package directory for the main isolate.
If a non-null value is returned, the value will be a file URI String and it will NOT have a trailing slash.
Implementation
Future<String?> rootPackageDirectoryForMainIsolate(
DTDManager dtdManager,
) async {
final fileUriString = await mainIsolateRootLibraryUriAsString();
final packageUriString = fileUriString != null
? await packageRootFromFileUriString(
fileUriString,
dtd: dtdManager.connection.value,
)
: null;
_log.fine('rootPackageDirectoryForMainIsolate: $packageUriString');
return packageUriString;
}