resourceLength method

  1. @override
Future<int> resourceLength(
  1. String path
)
override

Implementation

@override
Future<int> resourceLength(String path) async {
  String? filePath = files[path];
  if (filePath == null) {
    throw ContainerException.resourceNotFound(path);
  }
  File file = File(filePath);
  if (!await file.exists()) {
    throw ContainerException.fileNotFound(path);
  }

  return file.length();
}