Top.Mail.Ru
February 28th, 2003 - Java developers — LiveJournal
? ?

Java developers

February 28th, 2003
Image

10:53 am - Imagefosterbass - File.canWrite()

Ugh. If I call File.canWrite() and it returns true, I should be able to write to the damn file.

Turns out that if the file is in use by another application, the canWrite() method returns true but when I try to read from or write to the file, I get an exception.

Anyone know a simple way to know when a file is done being written to? (I'm polling a directory and I need to process a file as soon as it shows up, but I seem to be grabbing it before it's all there).

Thanks.
Powered by LiveJournal.com
Image