deleteFile static method

void deleteFile(
  1. String path
)

Implementation

static void deleteFile(String path) {
  try {
    final File file = File(path);
    final bool exists = file.existsSync();
    if (exists) {
      file.deleteSync();
    }
  } catch (_) {
    rethrow;
  }
}