Controllato funzionamento existsFile() createFile() in logic.c
This commit is contained in:
1 parent
d82b5466b0
commit
7eee20414c
2 files changed
+7
-4
No files matched your search
+2
-2
@@ -34,7 +34,7 @@ void createFile(const char *fname) {
|
||||
}
|
||||
|
||||
char* getProducts(const char *fname) {
|
||||
FILE *file;
|
||||
/* FILE *file;
|
||||
|
||||
if((file=fopen(fname, "r"))==NULL) {
|
||||
printf("Errore nell'apertura del file");
|
||||
@@ -50,7 +50,7 @@ char* getProducts(const char *fname) {
|
||||
count++;
|
||||
}
|
||||
fclose(file);
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
int getCount(){
|
||||
|
||||
+5
-2
@@ -7,8 +7,11 @@
|
||||
#include "../include/globals.h"
|
||||
|
||||
int main() {
|
||||
printf("%d", exists("qwestoeuntest"));
|
||||
/* Working
|
||||
printf("%d", existsFile("qwestoeuntest"));
|
||||
createFile("qwestoeuntest");
|
||||
printf("%d", exists("qwestoeuntest"));
|
||||
printf("%d", existsFile("qwestoeuntest"));
|
||||
*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user