pic32/libraries/SD/utility/SdFile.cpp
//------------------------------------------------------------------------------
/**
 * Remove a file.
 *
 * The directory entry and all data for the file are deleted.
 *
 * \param[in] dirFile The directory that contains the file.
 * \param[in] fileName The name of the file to be removed.
 *
 * \note This function should not be used to delete the 8.3 version of a
 * file that has a long name. For example if a file has the long name
 * "New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".
 *
 * \return The value one, true, is returned for success and
 * the value zero, false, is returned for failure.
 * Reasons for failure include the file is a directory, is read only,
 * \a dirFile is not a directory, \a fileName is not found
 * or an I/O error occurred.
 */
Remove a file.
The directory entry and all data for the file are deleted.

\param[in] dirFile The directory that contains the file.
\param[in] fileName The name of the file to be removed.

\note This function should not be used to delete the 8.3 version of a
file that has a long name. For example if a file has the long name
"New Text Document.txt" you should not delete the 8.3 name "NEWTEX~1.TXT".

\return The value one, true, is returned for success and
the value zero, false, is returned for failure.
Reasons for failure include the file is a directory, is read only,
\a dirFile is not a directory, \a fileName is not found
or an I/O error occurred.
Remove a file . The directory entry and all data for the file are deleted . \ param [ in ] dirFile The directory that contains the file . \ param [ in ] fileName The name of the file to be removed . \ note This function should not be used to delete the 8 . 3 version of a file that has a long name . For example if a file has the long name " New Text Document . txt " you should not delete the 8 . 3 name " NEWTEX~1 . TXT " . \ return The value one true is returned for success and the value zero false is returned for failure . Reasons for failure include the file is a directory is read only \ a dirFile is not a directory \ a fileName is not found or an I / O error occurred .
uint8_t SdFile::remove(SdFile* dirFile, const char* fileName) {
  SdFile file;
  if (!file.open(dirFile, fileName, O_WRITE)) return false;
  return file.remove();
}
uint8_t SdFile :: remove ( SdFile * dirFile , const char * fileName ) { SdFile file ; if ( ! file . open ( dirFile , fileName , O_WRITE ) ) return false ; return file . remove ( ) ; }
Remove a file.
Remove a file .