sandboxed-api/oss-internship-2020/sapi_libarchive/examples/sapi_example.cc

18 lines
313 B
C++
Raw Normal View History

2020-09-07 22:11:39 +08:00
#include <iostream>
2020-09-14 22:39:16 +08:00
#include "libarchive_sapi.sapi.h"
2020-09-07 22:11:39 +08:00
int main() {
2020-09-14 22:39:16 +08:00
std::cout << "WORKS2" << std::endl;
LibarchiveSandbox sandbox;
sandbox.Init().IgnoreError();
LibarchiveApi api(&sandbox);
if (api.archive_write_disk_new().ok()) {
std::cout << "OK" << std::endl;
}
return 0;
2020-09-07 22:11:39 +08:00
}