Hi jh123,
there is an example included in the library, see screenshot.
The correct path to the SD Card would be eg. "/media/mmcblk1p1/testfile.txt", you have to mount the card before in the Settings --> Storage,
The name can be found in the web frontend "Settings --> Storage" as well
The file in the example will be written to appdata/plc/run/linux-gcc-aarch64/data. See also this post.
You could read/write it from there eg. with Node-RED, see second screenshot:
Path: /var/snap/ctrlx-node-red/current/solutions/activeConfiguration/plc/run/linux-gcc-aarch64/data/testfile.txt
... View more