Forums Register Login

How to recognize whether being copy record completed or

+Pie Number of slices to send: Send
Does anyone have a solution how to recognize whether file is completed to copy all records?

when being copy a big size file into the folder, other java application need to move other folder only after copying completed.
However, middile of being copy, other java application can move to other folder even has not been finished yet.

File class does not have a relevant method like canWrite() canRead() etc for recognize of complete.

Thus, I used lastModified to check a time and delay for a minute.
which is not good solution becuase even small size file need to wait a certern min to move other folder.

welcome any suggestion,

thanks,
+Pie Number of slices to send: Send
"Eung JM", please check your private messages for an important administrative matter.
[ July 31, 2008: Message edited by: Bear Bibeault ]
+Pie Number of slices to send: Send
There's no good, cross-platform way to do what you want. The best option is to write to a temporary file then rename that to the final file name.
Warning! Way too comfortable! Do not sit! Try reading this tiny ad instead:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1219 times.
Similar Threads
How to deploy a GUI Swing application?
JFileChooser + FileView = bad performance with Thumbnails
File Renaming while getting copied.
Exceptation in thread "main" java.lang.NoSuchMethodError: main
Mac OS X > Copying JavaApplicationStub using Java code
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 02:47:50.