How to open .zip file in my HDK project?

   980   0   1
User Avatar
Member
3 posts
Joined: 7月 2020
Offline
the usual zip, not the usdzip, I use usdzipfile to open my zip file, but return a invalid pointer:
std::string zipFilePath = filePath.toStdString();
zipFilePath = "D:/HoudiniProjects/Proj/gcache/test.zip";
UsdZipFile zipFile = UsdZipFile::Open(zipFilePath);
UsdZipFile::Iterator testIterator = zipFile.begin();
std::string testName = *testIterator;
UsdZipFile::Iterator zipIterator = zipFile.Find("Terrain.json");
size_t jsonSize = zipIterator.GetFileInfo().size;
thx!
  • Quick Links