I think that the documentation is right, but there is a trick.
When you call DeleteDirectory passing an existent file the first exception thrown is a
IOException ...... A file with the same name and location specified by path exists.
You can prove this with
var tempFile = Path.Combine(Path.GetTempPath(), "MyTestDirectory", "inexistentfile.txt");
var tempPath = Path.Combine(Path.GetTempPath(), "MyTestDirectory");
Directory.CreateDirectory(tempPath);
string file = Path.Combine(tempPath, "File1235.txt");
CreateDummyFile(file);
if(File.Exists(file)) Console.WriteLine("File exists");
Directory.Delete(tempFile, true);
Now, if you try to pass a file name that doesn't exist the exception DirectoryNotFoundException
is thrown as expected.