I'm currently using the SDFat library and am passing a global FatFile
I if have a function that requires an SdFile type and I know that a given instance of FatFile is a valid SdFile what is the best way to reopen FatFile F as SdFile J?
Right now I'm doing:
SdFile ActiveFile; //Global Active File
...
void SDRun (FatFile &RunFat)
{
SdFile RunRoot;
RunRoot.open("/", O_READ);
ActiveFile.close();
ActiveFile.open(&RunRoot,RunFat.dirIndex(),O_READ);
....
However, this only works when RunFat is in the root directory.
