I'm trying to great a zip and add images to it at run time. However I can't seem to find a way to do that. If I use
createAndWriteFile("newzip.zip",false);
It will make a file called "newzip.zip" but it will give me errors and when change of extention to txt it acts as a text file, which I've assumed to be all that "creatandwritefile" can make. I've searched the manual and the fourm and I can't find anything that seems to work.
Thanks for any help.
creating a zip at run time
you can try
http://www.zlib.net/ or
http://www.codeproject.com/KB/files/zip_utils.aspx
does irrlicht have? or just reader?
http://www.zlib.net/ or
http://www.codeproject.com/KB/files/zip_utils.aspx
does irrlicht have? or just reader?
A file's type is basically defined by its extension and the format of its contents define whether it's a valid file of that type...
You can rename any file to .txt and you'll be able to open it in notepad or whatever, but it won't necessarily have anything readable in it.
A file is just a collection of data... and that's what you can create with the file writing functions. So if you wanted to create a zip file you'd have to output the data in the correct format that a zip file requires. Obviously that's not trivial as it's compressed data and the like.
You can rename any file to .txt and you'll be able to open it in notepad or whatever, but it won't necessarily have anything readable in it.
A file is just a collection of data... and that's what you can create with the file writing functions. So if you wanted to create a zip file you'd have to output the data in the correct format that a zip file requires. Obviously that's not trivial as it's compressed data and the like.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Zip files are not tightly integrated into Irrlicht's Filesystem structure, which makes such additions usually a little clumsy by design. But there's no thing which would prohibit such an enhancement. The new filesystem layout should make this simpler, though, but there's no date fixed, yet, when we'll even start with it