Hi- I would like to write a function copy(File f1, File f2) f1 is always a file. f2 is either a file or a directory.
If f2 is a directory I would like to copy f1 to this directory (the file name should stay the same).
If f2 is a file I would like to copy the contents of f1 to the end of the file f2.
So for example if F2 has the contents:
2222222222222
And F1 has the contents
1111111111111
And I do copy(f1,f2) then f2 should become
2222222222222
1111111111111
Thanks!