Does the file REALLY exist

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Back
Top