fat_io_lib icon indicating copy to clipboard operation
fat_io_lib copied to clipboard

makeing files?

Open KingVentrix007 opened this issue 2 years ago • 0 comments

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

KingVentrix007 avatar Oct 02 '23 12:10 KingVentrix007