-
Notifications
You must be signed in to change notification settings - Fork 252
Closed
Description
The files examples just use a filename 'test.txt', however I have discovered that a path needs to be supplied for both the the win and esp32 cases.
For the esp32 - it needs to be /spiffs/test.txt and on the desktop you can specify ./folder/test.txt and it will read/write in the the current project folder.
./ also works for windows - c:\\users\....\\ is not necesssary.
For the ESP32 you also need to add the partitions csv to the manifest. My current manifest looks like this:
{
"platforms":{
"esp32": {
"build": {
"PARTITIONS_FILE": "$(MODDABLE)/examples/files/files/partitions.csv",
},
"config": {
"root_fs": "/spiffs/",
},
},
"win": {
"config": {
"root_fs": "./dist/",
},
},
},
...
}
so this alows:
import config from "mc/config";
const root = config.root_fs;
Which keeps the code platform independant. Will this sort of thing confuse the basic examples or should it be constributed as separate example? The current examples hint at this with commented out code that could be fleshed out.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels