checkFileExists method

Future<bool> checkFileExists({
  1. String? fileName,
  2. String? path,
})

Returns true if the file identified by fileName (relative to filesPath) or by the absolute path exists on disk.

Implementation

Future<bool> checkFileExists({String? fileName, String? path}) async {
  final String resolved = await _resolvePath(fileName, path);
  return File(resolved).existsSync();
}