How to check for a dynamically created file in Java?

Posted by Moev4 on Stack Overflow See other posts from Stack Overflow or by Moev4
Published on 2010-04-27T20:58:21Z Indexed on 2010/04/27 23:33 UTC
Read the original article Hit count: 223

Filed under:
|
|

I have an application where I need to check for a file which may be created dynamically during my execution, I will give up after some MAX time where the file has yet to show up. I wanted to know if there was a more efficient method in Java of checking for the file other than polling for it and then sleeping every X seconds? If not what would be the most efficient manner of doing this?

© Stack Overflow or respective owner

Related posts about java

Related posts about file