pic32/libraries/SD/utility/SdFile.cpp
//------------------------------------------------------------------------------
// Read next directory entry into the cache
// Assumes file is correctly positioned
Read next directory entry into the cache
Assumes file is correctly positioned
Read next directory entry into the cache Assumes file is correctly positioned
dir_t* SdFile::readDirCache(void) {
  if (!isDir()) return NULL;
  uint8_t i = (curPosition_ >> 5) & 0XF;
  if (read() < 0) return NULL;
  curPosition_ += 31;
  return (SdVolume::cacheBuffer_.dir + i);
}
dir_t * SdFile :: readDirCache ( void ) { if ( ! isDir ( ) ) return NULL ; uint8_t i = ( curPosition_ >> 5 ) & 0 XF ; if ( read ( ) < 0 ) return NULL ; curPosition_ += 31 ; return ( SdVolume :: cacheBuffer_ . dir + i ) ; }
Read next directory entry into the cache
Assumes file is correctly positioned
Read next directory entry into the cache Assumes file is correctly positioned
// error if not directory // index of entry in cache // use read to locate and cache block // advance to next entry // return pointer to entry