cleanupLaunchSessionFiles function

void cleanupLaunchSessionFiles()

Removes launch-owned session files before starting a new launch.

Implementation

void cleanupLaunchSessionFiles() {
  for (final path in [
    pidFile,
    appPidFile,
    controllerPidFile,
    controllerPortFile,
    controllerTokenFile,
    logFile,
    logCollectorPidFile,
    logCollectorScript,
    vmUriFile,
    launcherScript,
    deviceFile,
    platformFile,
    appIdFile,
  ]) {
    final file = File(path);
    if (file.existsSync()) {
      file.deleteSync();
    }
  }
}