not quite. Couple of straight forward syntax errors. Catfile is probably fine, as the program died at an expected line, and, has compiled without complaining about the existence of the function catfile. But the arguments passed to it are amiss. This is probably due to the paths not being stated relatively in the rough draught.
There was a thirdly, I did not mention previously. Thirdly, Paths and Files are different entities. You are using two directory opens when that is not needed for this copy operation. I think you may need to review the difference between a path and a file. To further complicate this issue, a Directory is a File. Well it is easier to say that both a directory and a file can be recognised as a string (or path). You then need to treat that string correctly depending whether it is a file, or a directory.
P.S. That is what untested means, 'probably does not work, but you get the gist...'
hope this helps. DoC
|