fileSize method

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

Returns the size of the file at the specified path.

Implementation

@override
Future<int> fileSize(String path) async {
  final file =
      await getFile(path); // getFile already resolves and handles root
  if (!await file.exists()) {
    throw FileSystemException(
        "File not found for size check: $path (resolved to ${file.path})");
  }
  return await file.length();
}