Semi-gravedig. But uh.. this seems pretty straightforward to do on your own? Correct me if I'm not understanding something...
PHP Code:
function copyfile(source, output) {
temp.contents.loadlines(temp.source);
temp.contents.savelines(temp.output, 0);
}