fileExists method

Future<bool> fileExists(
  1. String path
)

Checks if a file exists on the Frame device.

Args: path (String): The full path to the file to check.

Returns: Future

Implementation

Future<bool> fileExists(String path) async {
  final String? response = await frame.bluetooth.sendString(
    'r=frame.file.open("$path","read");print("o");r:close()',
    awaitResponse: true,
  );
  return response == "o";
}