How do I get files to be compressed from this path: “Projects/” … chooseProject system.DocumentsDirectory
The variable is correct and the folder and files in it exist, however, when I create a zip, it takes files for compression from the root documents folder
exportQuestCallFunc = function()
local function zipListener( event )
if ( event.isError ) then
print( “Error!” )
else
print ( event[“type”] ) → compress
print ( event.response[1] ) → space.jpg
print ( event.response[2] ) → space1.jpg
print ( event.response[3] ) → space2.jpg
end
end
local zipOptions = {
zipFile = "trash/powered by Meander.zip", -- Добавлен путь "trash/"
zipBaseDir = system.DocumentsDirectory,
srcBaseDir = system.DocumentsDirectory,
srcFiles = {
"settings.json",
"tags.json",
"nodes.json"
},
listener = zipListener
}
local lfs = require "lfs"
local trashPath = system.pathForFile("trash", system.DocumentsDirectory)
lfs.mkdir(trashPath)
zip.compress( zipOptions )
end