Create and Write File in flash memory

Hey everyone!!!

I am using an Digi Xbee 3 Zigbee and I would like to ask how can I create a file and write/read in/from it using MicroPython?
My attempt was to import uio module and then use the class uio.BytesIO in example. Everything seems to work but the file doesn’t seem to exist somewhere inside the flash memory…

Do you have any better idea of doing it or maybe an explanation why is that happening(maybe this file is created only in RAMs space)?

Thank you in advance!

Try using the File System example that is located in the XBee Py Charm plugin. It should give you the data you are looking for.

Thanks for your answer!

uio.BytesIO class seems to write the contents to a file, in an in-memory buffer. In other words a chunk of RAM.
So, the open method (suggested in the example that mvut suggested) is the way to write files in flash.