pic32/libraries/SD/utility/SdFile.cpp
//------------------------------------------------------------------------------
/** %Print the name field of a directory entry in 8.3 format to Serial.
 *
 * \param[in] dir The directory structure containing the name.
 * \param[in] width Blank fill name if length is less than \a width.
 */
%Print the name field of a directory entry in 8.3 format to Serial.
\param[in] dir The directory structure containing the name.
\param[in] width Blank fill name if length is less than \a width.
%Print the name field of a directory entry in 8 . 3 format to Serial . \ param [ in ] dir The directory structure containing the name . \ param [ in ] width Blank fill name if length is less than \ a width .
void SdFile::printDirName(const dir_t& dir, uint8_t width) {
  uint8_t w = 0;
  for (uint8_t i = 0; i < 11; i++) {
    if (dir.name[i] == ' ')continue;
    if (i == 8) {
      Serial.print('.');
      w++;
    }
    Serial.write(dir.name[i]);
    w++;
  }
  if (DIR_IS_SUBDIR(&dir)) {
    Serial.print('/');
    w++;
  }
  while (w < width) {
    Serial.print(' ');
    w++;
  }
}
void SdFile :: printDirName ( const dir_t & dir , uint8_t width ) { uint8_t w = 0 ; for ( uint8_t i = 0 ; i < 11 ; i ++ ) { if ( dir . name [ i ] == ' ' ) continue ; if ( i == 8 ) { Serial . print ( ' ' ) ; w ++ ; } Serial . write ( dir . name [ i ] ) ; w ++ ; } if ( DIR_IS_SUBDIR ( & dir ) ) { Serial . print ( ' ' ) ; w ++ ; } while ( w < width ) { Serial . print ( ' ' ) ; w ++ ; } }
%Print the name field of a directory entry in 8.3 format to Serial.
%Print the name field of a directory entry in 8 . 3 format to Serial .