getFile method
Gets the content of the file at path
.
If the response is empty the file will be created with no data.
Implementation
Future<void> getFile(
PathUri path,
File file, {
void Function(double progress)? onProgress,
}) async {
final sink = file.openWrite();
final stream = getStream(
path,
onProgress: onProgress,
);
await stream.pipe(sink);
await sink.close();
}