exists method

  1. @override
Future<bool> exists(
  1. String uri,
  2. bool isDir
)
override

Implementation

@override
Future<bool> exists(String uri, bool isDir) async {
  final res = await methodChannel.invokeMethod<bool>(
    'exists',
    {'uri': uri, 'isDir': isDir},
  );
  if (res == null) {
    throw Exception('Failed to check if file exists: $uri');
  }
  return res;
}