Method Stdio.cp()

Method cp

int cp(string from, string to)


Copies the file from to the new position to. If there is no system function for cp, a new file will be created and the old one copied manually in chunks of DATA_CHUNK_SIZE bytes.

This function can also copy directories recursively.


0 on error, 1 on success


This function keeps file and directory mode bits, unlike in Pike 7.6 and earlier.