lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


----- Original Message -----
From: Joshua Jensen
Date: 5/26/2009 2:46 PM
----- Original Message -----
From: Marco Antonio Abreu
Date: 5/26/2009 2:00 PM
I need to create a compacted file (zip, gzip, bzip or tar.gz) with some files inside it from a Lua script on Windows. I look for LuaZip, but it does not create zip files, only read them.
What is the best solution for my need?
The LuaPlus module vdrive does this very well. Find it at svn://svn.luaplus.org/LuaPlus/work51/Src/Modules/vdrive. Unfortunately, it currently uses LuaPlus APIs and is not directly compatible with lua-5.1.dll. However, it shouldn't take too long to just use the Lua APIs.

It supports zip file creation, file erasing/renaming/insertion, and even lists of files provided to the ProcessFileList() function which, in turn, creates a zip with the files in the order specified. It also supports encryption, although the encryption is not compatible with Winzip.
I have converted this to be Lua API calls only, so anyone can grab svn://svn.luaplus.org/LuaPlus/work51/Src/Modules/vdrive and svn://svn.luaplus.org/LuaPlus/work51/Src/Modules/Misc and have a full .zip module.

Josh