put method

  1. @override
Future<String> put(
  1. String path,
  2. List<int> bytes
)
override

Stores the bytes at the specified path.

Returns the path where the file was stored.

Implementation

@override
Future<String> put(String path, List<int> bytes) async {
  final fullPath = p.join(root, path);
  final file = File(fullPath);
  if (!await file.parent.exists()) {
    await file.parent.create(recursive: true);
  }
  await file.writeAsBytes(bytes);
  return path;
}