fat_io_lib
fat_io_lib copied to clipboard
makeing files?
Hi, i am trying to make a .log nad .json file, but the code wont make those file types, it also wont do a .h file. I dont think this is a issue with my implementation.
else if (strcmp(arguments[0],"touch") == 0)
{
char path[FATFS_MAX_LONG_FILENAME] = "";
strcat(path,cwd);
strcat(path,"/");
strcat(path,arguments[1]);
FILE* file = fl_fopen(path, "a");
if (file == NULL) {
perror("Failed to open file"); // Print an error message if the file can't be opened
return 1; // Return an error code
}
}
It can make .txt and .c.
thx