Hi,
you can check the file mode using the following code:
try
{
using (Stream stream = File.Open(e.FullPath, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite))
{
if (stream != null)
{
break;
}
}
}
catch (FileNotFoundException ex)
{
}
catch (IOException ex)
{
}
catch (UnauthorizedAccessException ex)
{
}