File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File IO Question

 
Shane Burgel
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a File object and I want to be able to know if the actual file on the disk that it references is currently being written to. Is there any way to do this?
 
Barry Andrews
Ranch Hand
Posts: 523
C++ Java Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To see if the file is currently being written to, you could check the size a few times using the length() method to determine if the file is growing or shrinking. I believe this will work.

Hope it helps!

Barry
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic