unpack method

Future<bool> unpack({
  1. required String path,
})

Implementation

Future<bool> unpack({required String path}) async {
  final file = File(path);
  final directory = Directory(Path.withoutExtension(path));

  if (!file.existsSync()) throw Exception('Missing passkit file');
  directory.createSync(recursive: true);

  try {
    await _createFile(directory: directory, file: file);
    return true;
  } catch (exception) {
    delete(directory, file);
    throw exception;
  }
}