getFileSync method

  1. @override
ItemOutput getFileSync(
  1. String path
)
override

Reads an item from the specified path synchronously.

Throws an Exception if the file doesn't exist or cannot be read.

Implementation

@override
ItemOutput getFileSync(String path) {
  final stored = _storage[path];
  if (stored == null) throw Exception('File does not exist: $path');
  return ItemOutput(
    item: Map<String, dynamic>.from(stored.item),
    createdAt: stored.createdAt.toIso8601String(),
  );
}