11.08.2016, 18:59
Here try this:
PHP код:
stock frename2(const path[], const newPath[])
{
if(!fexist(path)||fexist(newPath)) return 0;
new File:f = fopen(path,io_read),buffer[512];
fread(f,buffer,sizeof(buffer));
fclose(f);
fremove(path);
f = fopen(newPath,io_write);
fwrite(f,buffer);
fclose(f);
return 1;
}