What I want to be able to do is export files in text, and be able to add them as assets in a completely different project.
So for example, export a CSV file, or something similar, then be able to add that file to a different project the way I add any other asset. I can do this now?
function writeFile(fileName, data)
local file = os.getenv("HOME") .. "/Documents/Dropbox.assetpack/" .. fileName
wFd, err = io.open(file, "w")
if wFd == nil then
error("\
\
Error creating/editing file " .. fileName .. "\
\
Error: " .. err)
end
wFd:write(data)
wFd:close()
print("File " .. fileName .. " installed!")
end
function readFile(fileName)
local file = os.getenv("HOME") .. "/Documents/Dropbox.assetpack/" .. fileName
rFd, err = io.open(file, "r")
if rFd == nil then
error("\
\
Error reading file " .. fileName .. "\
\
Error: " .. err)
end
local ret = rFd:read("*all")
rFd:close()
return ret
end
It puts the files in your Dropbox, so you can even open them on another computer.
@Ignatz This method puts them in separate files, so nothing conflicts and you can view them in iExplorer.