title: Is there a way to instantly check whether a directory is in use?
body: <p>I want to move a directory and all of its subdirectories with Directory.Move. </p>
  
  <p>Before I do that, however, I want to check whether any of the files and subfiles in the directory and its subdirectories are being used by other processes. </p>
  
  <p>Then, before the move, I'd like to lock the directory to other processes, so I can be sure that Directory.Move won't throw any exceptions.</p>
  
  <p>What is the best way to accomplish that?</p>
  
  <p>I would like to avoid checking for the usage of the individual files file by file, because the fact that the file isn't used when the software checks for it does not mean that it won't be used when the movement process starts.</p>