Can KyeFAT open files by filenumber?
Oldbitcollector (Jeff)
Posts: 8,091
I'm fighting with what should be a simple routine. I'm attempting to open files by file number (a simple trick in fsrw) using the KyeFAT driver.
The idea here is to read the directory up to the "fileNumber", then open that file. Increasing/Decreasing "fileNumber" and re-running the routine should allow me to switch to the next file or the previous.
Can someone see where I'm going wrong here?
Thanks
PUB openNextFile | i sd.listEntries("W") repeat i from 0 to fileNumber repeat while(buffer := sd.listEntries("N")) str.copy(buffer,@filename) str.trimstring(@filename) i++ 'sd.openfile( @filename, "r")
The idea here is to read the directory up to the "fileNumber", then open that file. Increasing/Decreasing "fileNumber" and re-running the routine should allow me to switch to the next file or the previous.
Can someone see where I'm going wrong here?
Thanks
Comments