Can't get (f)truncate working
Posted: Fri Aug 21, 2009 2:34 pm
I want to reduce the size of a file without copying and tried the following.
I also added -lfat in LIBS.
The problem is the filesize is the same like before after running the code.
Can anybody help me please?
Code: Select all
#include <nds.h>
#include <fat.h>
#include <stdio.h>
#include <unistd.h>
int main(void) {
fatInitDefault();
truncate("test.dat", 123);
while(1) {
swiWaitForVBlank();
}
return 0;
}
The problem is the filesize is the same like before after running the code.
Can anybody help me please?