length_ method

FutureOr<int> length_()

Returns size the File in bytes. Returns 0 if the File does not exist.

Implementation

FutureOr<int> length_() async {
  final file = File(addPrefix(path));
  try {
    if (await file.exists_()) {
      return file.length();
    }
  } catch (exception, stacktrace) {
    print(exception.toString());
    print(stacktrace.toString());
  }
  return 0;
}