Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makeing files? #8

Open
KingVentrix007 opened this issue Oct 2, 2023 · 0 comments
Open

makeing files? #8

KingVentrix007 opened this issue Oct 2, 2023 · 0 comments

Comments

@KingVentrix007
Copy link

KingVentrix007 commented Oct 2, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant