size method

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

Get the file size of a given file.

Implementation

@override
Future<int> size(String path) async {
  try {
    return await fileSystem.file(path).length();
  } catch (e) {
    if (config.throw_) {
      throw FilesystemException('Unable to get file size: $path', cause: e);
    }
    return 0;
  }
}