Yes. Having the entire path as a key would be one way to go about it.
Another way could be to have the folder name as the key and the value could be serialized MDataInfo
of a different mutable data. This other MData can hold all the files inside that directory
So for instance,
In the app’s own container(App’s root folder):
Key | Value |
---|---|
file1 | dataMap |
file2 | dataMap |
folder1 | serializedMdInfo(name: folder1, typetag: 15234) |
file3 | dataMap |
And in mutable data with name: folder1 and typetag: 15234
Key | Value |
---|---|
file4 | dataMap |
file5 | dataMap |
You can even have an empty folder, which will be a mutable data without any entries. You can add files(entries) later, whenever required
P.S.: This just an approach, there can be multiple other possibilities too