• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File IO Question

 
Shane Burgel
Ranch Hand
Posts: 47
  • 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: 528
C++ Java Ubuntu
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic