Does the file REALLY exist

G

Guest

I'm looking at a directory into which files will be copied asyncronously by a
user. If a file takes some time to copy, it is possible to detect the file
before the copy has finished. If I try to process the file, an exception is
thrown. How can I determine if the file is REALLY there and ready to be
processed?

Thanks in advance,
Tom Costanza MCP
 
S

Stephany Young

Attempt to open the file with a lock for exclusive access.

If the file copy has not yet finished then your operation will throw an
exception.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top