

File data is represented by a string with the data while directory data is represented as a table with the same format as the root directory.Īrchives returned by the library are represented as filesystem objects with the same methods as the fs library, with two extra methods: write(path) writes the archive to a file, and extract(path) extracts the file in the archive to a directory. FormatĪrchives are gzipped serialized Lua tables with the file name as the key and the file/directory data as the value. Library for creating ComputerCraft-friendly archives. only replace files that are newer than current archive contents do not warn if the library had to be created R - replace existing or insert new file(s) into the archive path: The absolute path of the ar file to saveįunctions similarly to GNU/BSD ar, with the following options:.data: The list of file entries to write.nil ar.save( table data, string path): Writes a list of file entries to an ar archive.Returns: A list of file entries that can be used by ar.save().path: The absolute path to the directory to load.table ar.pack( string path): Loads files in a directory into a list of ar entries.Returns: An ar file entry with the contents of the file.

path: The absolute path to the file to load.table ar.read( string path): Reads a file into an ar file entry.path: The absolute path to the output directory.archive: Either an archive loaded with ar.load() or the absolute path to an archive.nil ar.extract( table/string archive, string path): Writes an entire archive to a directory.path: The absolute path to the output file.

