avec dfu

Fork of Utils by POTLESS

Files at this revision

API Documentation at this revision

Comitter:
POTLESS_2
Date:
Tue Feb 13 16:54:00 2018 +0000
Parent:
4:872676dd87a4
Child:
6:8bae97034114
Commit message:
reprise de la fonction file_exist

Changed in this revision

Utils.cpp Show annotated file Show diff for this revision Revisions of this file
Utils.h Show annotated file Show diff for this revision Revisions of this file
--- a/Utils.cpp	Tue Feb 13 14:36:26 2018 +0000
+++ b/Utils.cpp	Tue Feb 13 16:54:00 2018 +0000
@@ -110,7 +110,7 @@
     fclose(fd);
 }
 
-bool UTILS::File_Exist(char* File_Name)
+bool UTILS::File_Exist(string File_Name)
 {
     char filename[20];
     sprintf(filename, "/Root/%s.txt", File_Name);
@@ -122,7 +122,9 @@
         printf("  Le fichier %s n'existe pas....\r\n", filename);
         fclose(fd);
         return false;
-    }else{
+    }
+    
+    if (Exist_Val == 1){
         fclose(fd);
         return true;
     }   
--- a/Utils.h	Tue Feb 13 14:36:26 2018 +0000
+++ b/Utils.h	Tue Feb 13 16:54:00 2018 +0000
@@ -123,7 +123,7 @@
     * @returns
     *   true si le fichier existe, false s'il n'existe pas
     */
-    static bool File_Exist(char* File_Name);
+    static bool File_Exist(string File_Name);
 
 
 private: