write method

  1. @override
Future<void> write(
  1. String key,
  2. List<int> bytes, {
  3. required String contentType,
  4. required String cacheControl,
})
override

Implementation

@override
Future<void> write(
  String key,
  List<int> bytes, {
  required String contentType,
  required String cacheControl,
}) async {
  final file = _file(key);
  await file.parent.create(recursive: true);
  final tmp = File('${file.path}.tmp');
  await tmp.writeAsBytes(bytes, flush: true);
  await tmp.rename(file.path);
}