I want to analyze a file path in an Arduino program on Windows and on Linux (Raspberry Pi), for example to isolate the file name.
- in Windows the separator is ''
- In Linux, the separator is '/'.
How can i identify it? My example: isolate the file name from the specification FILE
The Windows version:
strcpy(fname,strrchr(__FILE__,'\\') + 1);
The Linux version ???
strcpy(fname,strrchr(__FILE__,'/') + 1);
Is there a constant like "Operating system" that is usable as an if argument?