コード例 #1
0
static int dumptoc(const char *filename, const char* tocfile) {
	xar_t x;
	x = xar_open(filename, READ);
	if( !x ) {
		fprintf(stderr, "Error opening xar archive: %s\n", filename);
		exit(1);
	}

	xar_serialize(x, tocfile);
	xar_close(x);
	return Err;
}
コード例 #2
0
ファイル: Xar.cpp プロジェクト: JDevlieghere/LibEBC
bool WriteTOC(std::string xarFile, std::string tocFile) {
#ifdef HAVE_LIBXAR
  xar_t x = xar_open(xarFile.c_str(), READ);

  if (x == nullptr) return false;

  xar_serialize(x, tocFile.c_str());
  xar_close(x);

  return true;
#else
  return false;
#endif
}