File manager

Dependencies:   SDFileSystem

Dependents:   RwSDCard_Xml_GPS

Revision:
38:e2799f75940f
Parent:
36:09e662a69c50
--- 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);
 }