store method

Future<void> store(
  1. String key,
  2. Uint8List bytes
)

Stores bytes under key, creating root when needed.

Throws an ArgumentError when key is not 16 lower-case hex characters (the shape frameKey produces).

Implementation

Future<void> store(String key, Uint8List bytes) async {
  _checkKey(key);
  await root.create(recursive: true);
  await File('${root.path}/$key').writeAsBytes(bytes, flush: true);
}