Java copy progress check

Is there any way to check the status of any individual file when the copy operation on it is in progress.

For example when in any unix system a long file of size 200 mb is copied using FTP. Any way to check when the file is written 100% on the disk.

The file size is not known in advance because the file is copyied by a schedular program from different host.

[379 byte] By [gpacharyaa] at [2007-11-26 17:53:24]
# 1
Have a look at the java.io.File class: http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.htmlPerhaps the canWrite() and length() methods can be of use to you.
prometheuzza at 2007-7-9 5:06:24 > top of Java-index,Core,Core APIs...
# 2
canWrite() method always returns true even if the file copy is in progress. This I have checked it before. Any idea how i can get use of file length attribute. File length is not known in advance..
gpacharyaa at 2007-7-9 5:06:24 > top of Java-index,Core,Core APIs...
# 3

> canWrite() method always returns true even if the

> file copy is in progress. This I have checked it

> before. Any idea how i can get use of file length

> attribute. File length is not known in advance..

Hmmm, have you tried renameTo(File dest) from the java.io.File class? It returns true if the file can be renamed/removed.

prometheuzza at 2007-7-9 5:06:24 > top of Java-index,Core,Core APIs...