zip
zip datatype
Functions
read
zip_object:read("folder/file.txt")
path
string
path to file
Returns:
contents
string
read_stream
zip_object:read_stream("folder/file.txt")
path
string
path to file
Returns:
file stream
table of char
write
zip_object:write("folder/file.txt", "data")
path
string
path to file
data
string
content to write to file
write_stream
zip_object:write_stream("folder/file.txt", {"a", "b", "c"})
path
string
path to file
data
table of char
stream to write
save
zip_object:save()Saves the file's content
get_files
zip_object:get_files()
Returns:
files
table
exists
zip_object:exists("folder/file.txt")
path
string
path to file
Returns:
true if file exists
boolean
extract
zip_object:extract("folder/file.txt", "some_directory")
path
string
path to file
destination
string
directory to extract file to
extract_all
zip_object:extract_all("some_directory")
destination
string
directory to extract file to
Last updated