Posted here on the offchance someone can help....
Does anyone out there have source (or link to source) for resolving relative paths in an environment where I can't just call an OS library function***. I ideally want to convert something like "c:\test\..\test2\file.txt" into "c:\test2\file.txt" Yes I can probably write my own but why re-invent the wheel....
*** So telling me to use realpath or something like it will not help, this is on a bare metal microcontroller, with no OS, but using the FatFS library.
for all subjects/topics not covered by the other forum categories
2 posts • Page 1 of 1
This may be overkill (it's designed for Unix and so handles symlinks, relative paths and the like), but it has ".." handling in it so you may be able to re-use the algorithm: http://www.scs.stanford.edu/histar/src/ ... realpath.c
Who is online
Users browsing this forum: No registered users and 1 guest