The code below is from K&B7 page 498
What I don't understand is...how is the "source" a file? (Note the comment on line3 "now two copies of the FILE") From the
test code that I've written, "source" is a directory and when the copy occurs, a new directory(folder) named "test2.txt" is created. Was that the intended outcome of this code snippet? What would make more sense, is if the "source" was an actual file, like "someFile.txt" and then the contents of someFile.txt would be copied into a new file called "test2.txt". But this whole idea of copying a directory into a file is a bit confusing. Can somebody shed some light on what exactly the author is trying to accomplish here?