File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to recognize whether being copy record completed or

 
Eung maeng
Ranch Hand
Posts: 68
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64205
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Eung JM", please check your private messages for an important administrative matter.
[ July 31, 2008: Message edited by: Bear Bibeault ]
 
Carey Evans
Ranch Hand
Posts: 225
Debian Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic