Current target: esp8266
On the official docs:
https://docs.micropython.org/en/latest/library/os.html
os.sync()
Sync all filesystems.
It seems to me that there are no references in the esp8266 pages regarding its absence:
https://docs.micropython.org/en/latest/esp8266/quickref.html
I have a long experience on linux and servers, so I know the possible pitfalls about syncing the file-systems and sudden power failures.
However... two questions:
- Why is os.sync not implemented on this target?
- Are there other solutions ?
As a workaround: after writing to the files, I call time.sleep(5) before reset().
It seems to work... but it's a bad trick, not reliable.
Current target: esp8266
On the official docs:
https://docs.micropython.org/en/latest/library/os.html
It seems to me that there are no references in the esp8266 pages regarding its absence:
https://docs.micropython.org/en/latest/esp8266/quickref.html
I have a long experience on linux and servers, so I know the possible pitfalls about syncing the file-systems and sudden power failures.
However... two questions:
As a workaround: after writing to the files, I call time.sleep(5) before reset().
It seems to work... but it's a bad trick, not reliable.