You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying PhyFS, seams really intresting but there is no example how to use write.
Result is a corrupted zip file
It would be great if I can get some help to understand what is wrong.
I'm using 3.3 release.
here is my simple code:
PHYSFS_init("d:\");
PHYSFS_setWriteDir("d:\");
PHYSFS_mount("d:\\testw.zip", "/" , true);
const char* writedir = PHYSFS_getWriteDir();
std::cout << writedir << std::endl; // for testing
PHYSFS_File* txtwtest = PHYSFS_openWrite("/txt2.txt");
int test = PHYSFS_writeBytes(txtwtest, "testwr", 5); // return 5 so it did write somewhere
PHYSFS_close(txtwtest);
PHYSFS_unmount("d:\\test.zip");
PHYSFS_deinit();
The text was updated successfully, but these errors were encountered:
guielec42
changed the title
Get example how to use writre to an archive
Get example how to use writre to a zip archive
Aug 14, 2023
The API allows it, but it's not implemented for anything but the native filesystem. There are questions about how to rewrite a .zip file to make this work cleanly, since you'd have to deal with the existing data, etc.
Hello,
I'm trying PhyFS, seams really intresting but there is no example how to use write.
Result is a corrupted zip file
It would be great if I can get some help to understand what is wrong.
I'm using 3.3 release.
here is my simple code:
PHYSFS_init("d:\");
PHYSFS_setWriteDir("d:\");
The text was updated successfully, but these errors were encountered: