I am creating an operating system with a built-in file system.
The file system works with lists, so all folders and files are stored in a list variable on snap!
I want users to have the ability to save their folders and files in a cloud variable and then be able to retrieve them.
My problem is that cloud variables are only stored in strings, so I need to make a reporter block that converts the filesystem list into a string, and another block to reverse the process, and I don't have any clue to do it.
I could use the combine block to insert a character between each item in the list, and then split by that character, but the list is more complex because there are lists inside that list.
Here's a visualization of that variable (disk):
As you can see in the list there are two folders; etc and tmp. Each folder has a content which is in the second column.
That content is another list like the root folder (the actual disk variable).
Here's the complete visualization of the etc folder (any folder is like that):
Watch these blocks in this project: you can store anything (text,number,list,boolean,costume,sound)
In addition, i store the value according to the user who is connected.
I just updated the library. Just export the new ones then drag and drop the new version into Snap!. The old ones will get replaced. Just letting you know, space limits apply.
50 MB for total space
1000 bytes per key
5 MB per value