-
Notifications
You must be signed in to change notification settings - Fork 51
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
[DOC] Error in ff_fopen() documentation #52
Comments
@carlk3 wrote:
Out of curiosity, I tried the same under Linux and Windows: both FILE *fp = fopen (fname, "w");
if (fp != NULL) {
fprintf(fp, "Hello world\n");
int rc = fseek (fp, 0, SEEK_SET);
if (rc == 0) {
char contents[ 32 ];
rc = fread (contents, 1, sizeof contents - 1, fp);
}
fclose (fp);
} I also tried to create the file with "w+", that does allow to write and read from the same hand.e So let's change the documentation: - Open a file for reading and writing. If the file ...
+ Open a file for writing. If the file ... Thank for your suggestion! |
Of course, "w+" is not explicitly documented, although "r+" is. Looking at the code for I have found that the pcMode string "rw" works well in this case. |
We have updated the content in the page |
I cannot see the change on the official page: https://freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_FAT/stdio_API/ff_fopen.html. Once that is fixed, the issue can be closed. |
Thank you @AniruddhaKanhere for pointing it out, working on updating it the official page, will update once done. |
The change is updated on the official page, Hence closing the issue. Thank you |
Describe the issue
Please describe the issue and expected clarification in concise language.
At ff_fopen, pcMode, Letter "w", Mode, it says "Open a file for reading and writing." This in incorrect. It is only opened for writing. If you try to read, permission is denied.
Reference
Please attach the URL at which you are experiencing the issue.
https://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_FAT/stdio_API/ff_fopen.html
Screenshot
If applicable, please attach screenshot.
Browser
The text was updated successfully, but these errors were encountered: