Chapter 9 GuaranteeAFile (p421)
I was unable to make this program work the way it was intended. It is a program to make sure that there is a file on the harddisk before you connect it to a FileOutputStream.
But the fact seems to be, that java checks on the harddisk for the file, and therefore both methods isFile() and isDirectory() will return false, which seems to be not what Ivor expected.
So the whole purpose if the program is actually forfeited. The program seems to be useless, unless there comes a fix. I will see what I can come up with.
Peter
|