If you check that the file is available, but then try and use it you could throw at that point, which a malicious user could use to force and exploit in your code.
protected virtual bool IsFileLocked(FileInfo file)
using(FileStream stream = file.Open(FileMode.Open, FileAccess.Read, FileShare.None))
//the file is unavailable because it is:
//still being written to
//or being processed by another thread
//or does not exist (has already been processed)
//file is not locked
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.