Yes, it will return files that are still in use. They are still in the directory, even if you cannot open them.
Verification code to confirm:
using System;
using System.IO;
using System.Linq;
class Test
{
static void Main()
{
File.Delete("test.tmp");
Console.WriteLine(Directory.GetFiles(".")
.Any(x => x.EndsWith("\\test.tmp")));
using (Stream stream = File.Create("test.tmp"))
{
Console.WriteLine(Directory.GetFiles(".")
.Any(x => x.EndsWith("\\test.tmp")));
}
}
}
, , , . - , -, - , .