This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Aptik's profile picture

Archive library

Started by Aptik, 12 April 2013 - 10:17 PM
Aptik #1
Posted 13 April 2013 - 12:17 AM
Include LArc library (or similar) to new versions of CraftOS.
In this case will be easy to destribute programs which uses several files to run.
Xfel #2
Posted 13 April 2013 - 12:23 AM
can't be added as it includes c modules.
mlaga97 #3
Posted 26 June 2013 - 04:37 AM
An alternate solution would be to use any of the several archiving tools written in Lua dispersed throughout the forum or write one yourself. I had a had to write one of my own ( I should probably upload that… ). I am quite sure cc-get has to have a pretty good implementation of some tool and might be worth looking into.
ChunLing #4
Posted 26 June 2013 - 09:36 AM
Don't a lot of people write simple installers to download multiple files?
Pharap #5
Posted 29 June 2013 - 02:02 PM
If you can find me the source code of the zip algorithms I could try porting it to Lua if it's not too hard. Or at least try and get a project team together to attempt it.

Edit:
Scratch that, the link you gave actually has most of the lua code in it: https://code.google..../filesystem.lua

Figure out which bits are implemented in C, chances are you may not need any modifications to ComputerCraft to be able to do it, it might be a matter of swapping out functions.

eg

function isdir(name)
  checklfs()
  local mode = lfs.attributes(name)
  return mode == 'directory'
end

Is already implemented in ComputerCraft as fs.isDir
Edited on 29 June 2013 - 12:07 PM