truncate a file
Posted: Fri May 18, 2018 2:23 pm
Hi everybody,
I have a FATFS filesystem and I open/write/read/close files without problems using stdio.h functions (fopen, fread,ecc..).
I need to truncate a file to a length less than original and I would like to use
reported in header file.
However, this seems not available when compiled I got
How can I truncate a file without reading all file content and writing it back with only new content?
Thanks
I have a FATFS filesystem and I open/write/read/close files without problems using stdio.h functions (fopen, fread,ecc..).
I need to truncate a file to a length less than original and I would like to use
Code: Select all
truncate, (const char *, off_t __length);
Code: Select all
~\esp-idf\components\newlib\include\sys/unistd.h
Code: Select all
error: implicit declaration of function 'truncate'
Thanks