Can a file be moved?
The Question:
Is there any way of checking whether or not a file can be moved?
The Context
My program is periodically checking a folder for new files. Files are moved into this folder via FTP. My program is designed to then move these files into a different folder. However, I want to ensure that the file has completely arrived.
The Example
For example, a 450MB file will appear to the Java File API, but I won't be able to move it if the file is still copying over.
The Restrictions
I know you can check the success/failure of a move - I don't want to do this (Althought it looks like I'll have no choice).
The results of File.canRead() and File.canWrite() don't help.
I don't want to do nasty tricks like monitoring the file's size over the course of a minute to see if it has stopped increasing.
Message was edited by:
david_bates
Message was edited by:
david_bates

