class VirtualDevicesTask implements AsyncSupplier<Collection<VirtualDevice>> {

  @Nullable
  @VisibleForTesting
  Snapshot getSnapshot(@NotNull Path snapshotDirectory) {
    Path snapshotProtocolBuffer = snapshotDirectory.resolve("snapshot.pb");
    Path snapshotDirectoryName = snapshotDirectory.getFileName();

    if (!Files.exists(snapshotProtocolBuffer)) {
      return new Snapshot(snapshotDirectoryName, myFileSystem);
    }

    try (InputStream in = Files.newInputStream(snapshotProtocolBuffer)) {
      return getSnapshot(SnapshotOuterClass.Snapshot.parseFrom(in), snapshotDirectoryName);
    }
    catch (IOException exception) {
      Logger.getInstance(VirtualDevicesTask.class).warn(snapshotDirectory.toString(), exception);
      return null;
    }
  }

    VirtualDevicesTask(boolean selectDeviceSnapshotComboBoxSnapshotsEnabled,
                     @NotNull FileSystem fileSystem,
                     @Nullable LaunchCompatibilityChecker checker);

}