05.04.2009, 03:37
Dose function "fp(g)utchar" support linux or mac.?
I have no chance to test cuz my pc's platform is WINDOWS,but server's platform is linux(freeBSD).
here's DracoBlue' fcopy code,he mentions that requires for WINDOWS,
Anyone know about it?thx^^
I have no chance to test cuz my pc's platform is WINDOWS,but server's platform is linux(freeBSD).
here's DracoBlue' fcopy code,he mentions that requires for WINDOWS,
pawn Код:
/**
* Copies a file (Source file won't be deleted!)
* @param oldname
* newname
* @requires WINDOWS
*/
fcopy(oldname[],newname[]) {
new File:ohnd,File:nhnd;
if (!fexist(oldname)) return false;
ohnd=fopen(oldname,io_read);
nhnd=fopen(newname,io_write);
new buf2[1];
new i;
for (i=flength(ohnd);i>0;i--) {
fputchar(nhnd, fgetchar(ohnd, buf2[0],false),false);
}
fclose(ohnd);
fclose(nhnd);
return true;
}
#pragma unused fcopy