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):