writeBytes method
Writes bytes to the file at path, creating or replacing it.
The parent directory must exist; throws when it does not.
Implementation
@override
Future<void> writeBytes(String path, List<int> bytes) async {
final String normalized = _resolve(path);
if (!_directories.contains(_parentOf(normalized))) {
throw StateError('no parent directory of "$path"');
}
_directories.remove(normalized);
_files[normalized] = Uint8List.fromList(bytes);
}