25.04.2011, 20:55
How can I get filesize in bytes on Linux?
I want to see file size while server is recording player's data.
here is the code I've made:
format(form, 256, "stat -c %ss scriptfiles/%i.rec", "%%", playerid);
system(form, string, sizeof(string));
When I run this code, server crashes?!
I tryed checking filesize from ssh with same command and it works fine.
Please help me fix this code or find other option to get filesize.
I want to see file size while server is recording player's data.
here is the code I've made:
format(form, 256, "stat -c %ss scriptfiles/%i.rec", "%%", playerid);
system(form, string, sizeof(string));
When I run this code, server crashes?!
I tryed checking filesize from ssh with same command and it works fine.
Please help me fix this code or find other option to get filesize.