pic32/libraries/SD/utility/SdFile.cpp
//------------------------------------------------------------------------------
/**
 * Format the name field of \a dir into the 13 byte array
 * \a name in standard 8.3 short name format.
 *
 * \param[in] dir The directory structure containing the name.
 * \param[out] name A 13 byte char array for the formatted name.
 */
Format the name field of \a dir into the 13 byte array
\a name in standard 8.3 short name format.

\param[in] dir The directory structure containing the name.
\param[out] name A 13 byte char array for the formatted name.
Format the name field of \ a dir into the 13 byte array \ a name in standard 8 . 3 short name format . \ param [ in ] dir The directory structure containing the name . \ param [ out ] name A 13 byte char array for the formatted name .
void SdFile::dirName(const dir_t& dir, char* name) {
  uint8_t j = 0;
  for (uint8_t i = 0; i < 11; i++) {
    if (dir.name[i] == ' ')continue;
    if (i == 8) name[j++] = '.';
    name[j++] = dir.name[i];
  }
  name[j] = 0;
}
void SdFile :: dirName ( const dir_t & dir , char * name ) { uint8_t j = 0 ; for ( uint8_t i = 0 ; i < 11 ; i ++ ) { if ( dir . name [ i ] == ' ' ) continue ; if ( i == 8 ) name [ j ++ ] = ' ' ; name [ j ++ ] = dir . name [ i ] ; } name [ j ] = 0 ; }
Format the name field of \a dir into the 13 byte array
 \a name in standard 8.3 short name format.
Format the name field of \ a dir into the 13 byte array \ a name in standard 8 . 3 short name format .