Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
exists() on the sd
-
anyone got the correct syntax for checking if a file exists on the SD?
can't seem to get a positive return
cheers
b
-
Hi @Ben-eaton,
You can try this:
// Open the file for reading myFile = File("/mnt/sd0/test.txt"); if (myFile) { // File test.txt exists // Close the file myFile.close(); } else { // File test.txt does not exist }
Best regards,
Kamil -
thanks
- managed to get the exists() working not sure what i was doing wrong first time round
b