Does anyone know about this problem? I tried using the "old" _stat for Cygwin/Windows but that doesn't help.
The problem I am having is st_size is ALWAYS 16777216 for any file I am stat'ing and that value is incorrect anyway. Here is an example of the code:
result is :
0, 16777216
btw - using the FILE functions, I get the correct sizes; e.g.
but I don't want to open and close the file just to get the size.
helpppp
The problem I am having is st_size is ALWAYS 16777216 for any file I am stat'ing and that value is incorrect anyway. Here is an example of the code:
Code:
char *filename = "C:\\Program Files\\Somedir\\medfile.txt";
int ret;
#if OS == LINUX
struct stat sbuf;
ret = stat( filename, &sbuf );
#elif OS == CYGWIN
struct _stat sbuf;
ret = _stat( filename, &sbuf );
#endif
printf("ret : %d, sbuf.st_size: %dl \n\n", ret, sbuf.st_size);
0, 16777216
btw - using the FILE functions, I get the correct sizes; e.g.
Code:
sizeFile = (UINT32)ftell( fp );
helpppp
Comment