Hi @TheGod,
-
I believe you need to run the app unsanboxed in order to create new directories.
See my post here: Unable to make new directories within Legato app - #3 by raf
Havingsandboxed: falsewas the only way it worked.
-
For persistent data storage:
I’ve used the same path and mounted an SD card at/mnt/userrw/sd.
If you are going to be storing lots of files or doing lots of write/erase operations on the module’s non-volatile Flash memory, be conscious of Flash wear (finite write/erase cycles - typically 100000). You may want to consider external memory. -
For non-persistent data storage (wiped on power cycle):
Use/tmp- this is mapped to the module’s RAM so there’s no concern over Flash wear here.
- See: le_dir.h File Reference - Legato Docs
le_dir_Makewill returnLE_DUPLICATEif the directory already exists. Try usingle_dir_MakePathinstead.
Raf