resolveDependencies static method
Implementation
static Future<List<List<int>>> resolveDependencies(
String path) async {
assert(pathHelper.isAbsolute(path));
return await IOOverrides.runZoned(() async {
final rootPath = pathHelper.dirname(path);
IOOverrides.current!.setCurrentDirectory(rootPath);
Map<String, List<String>> dependencies = <String, List<String>>{};
await _readAllDependencyKey(path, dependencies);
List<String> finalDependencies = depthFirstTraverse(dependencies, path);
List<List<int>> result = <List<int>>[];
for (String d in finalDependencies) {
assert(pathHelper.isRelative(d));
File file = File(d);
if (!file.existsSync()) {
throw Exception('${file.path} does not exist');
}
List<int> data =
await _getStreamWithTarData(File(d), TarKey.recordStream);
result.add(data);
}
return result;
});
}