Wauza, it’s been quite a while, huh.
Anyways, that aside, I was wondering if it was possible to create new folders underneath your given application folder with sys.get_save_file()
and sys.save()
(for organization’s sake)?
For example, something like going into C:\Users\Person\AppData\Roaming\name_of_game
and then making a new folder within it, turning it into C:\Users\Person\AppData\Roaming\name_of_game\some_subfolder
And if that’s not possible with sys.save()
(or any tangential functions) are there any workarounds?
Okii, so.
I think I have some sort of weird workaround that kind of works?
There were a few edits to the original post because I thought I found a workaround, thought it didn’t work, but turns out it does, with just a few nuances.
Turns out with sys.get_save_file()
, you can create new folders, just only one at a ᴛime.
So if you wanted to make more than one, you’d have to save something to space out the original subfolder first.
local subfolder = sys.get_save_file("app_name/sub1","can opener")
local f, err = io.open(subfolder, "wb")
-- Making another subfolder
subfolder = sys.get_save_file("app_name/sub1/sub2","can opener for the smaller can")
local f, err = io.open(subfolder, "wb")
f:close()
Something like that? I think it works.
(Edit) Turns out you don’t even need to write data to it, you just need to open it up with io.open()
. Neat!
Also note that Checkpoint handles nested save directories too, using the Lua File System native extension.
1 Like