Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 38:e2799f75940f, committed 2016-09-20
- Comitter:
- nsrwsurasak
- Date:
- Tue Sep 20 07:39:16 2016 +0000
- Parent:
- 37:ec629f815829
- Commit message:
- Fix bug and delete print message.
Changed in this revision
| FileManager.cpp | Show annotated file Show diff for this revision Revisions of this file |
| FileManager.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/FileManager.cpp Mon Sep 19 04:00:09 2016 +0000
+++ b/FileManager.cpp Tue Sep 20 07:39:16 2016 +0000
@@ -42,9 +42,6 @@
static void FILEMANAGER_GetXmlText(char *str, char *ret);
static void FILEMANAGER_GenerateFileNameWithTime(time_t timestamp, char * file_name);
static void FILEMANAGER_SetLedStatus(bool on);
-#if UART_FILE_ACCESS
-static void FILEMANAGER_AddPrefixFilename(char* in, char* out);
-#endif
/**
* @brief Utility function to Remove space charector from given char array
@@ -484,7 +481,6 @@
#if UART_FILE_ACCESS
FILEMANAGER_AddPrefixFilename(filename, m_bufFileName);
#endif
- printf("Deleting file '%s'...",filename);
#if UART_FILE_ACCESS
FILE *fp = fopen(m_bufFileName, "r"); // try and open file
@@ -503,7 +499,6 @@
#else
remove(filename); // and then delete
#endif
- printf("Done!\n");
}
// if we can't open it, it doesn't exist and so we can't delete it
}
@@ -726,11 +721,11 @@
{
if (serial != NULL)
{
- serial->printf(" - %s\n\r", p->d_name);
+ serial->printf("\n\r%s", p->d_name);
}
else
{
- printf(" - %s\n\r", p->d_name);
+ printf("\n\r%s", p->d_name);
}
}
@@ -830,7 +825,7 @@
}
return status;
}
-static void FILEMANAGER_AddPrefixFilename(char* in, char* out)
+void FILEMANAGER_AddPrefixFilename(char* in, char* out)
{
sprintf(out,"%s%s", PREFIX_FILE_NAME, in);
}
--- a/FileManager.h Mon Sep 19 04:00:09 2016 +0000 +++ b/FileManager.h Tue Sep 20 07:39:16 2016 +0000 @@ -124,6 +124,7 @@ bool FILEMANAGER_IsFileExist(char filename[]); void FILEMANAGER_listDir(Serial* serial); void FILEMANAGER_DisplayFile(Serial* serial, char* filename); +void FILEMANAGER_AddPrefixFilename(char* in, char* out); WritingFileStatus FILEMANAGER_WriteFile(Serial* serial, char* filename, char* input); void FILEMANAGER_Deletefile(char filename[]); uint32_t FILEMANAGER_GetRxID();
