streamAt method

  1. @override
Future<DataStream> streamAt(
  1. String path
)
override

Returns the data stream for the contents at the given relative path.

Implementation

@override
Future<DataStream> streamAt(String path) async {
  ZipPackage? package =
      await archive.catchError((e, st) => ZipPackage(File("")));
  ZipLocalFile? entry = package?.entries[path];
  if (package == null || entry == null) {
    throw ContainerException.resourceNotFound(path);
  }
  return ZipStream(package, entry);
}