If I have a string, I know I can use If System.IO.File.Exists(mystring) or System.IO.Directory.Exists(mystring) to see which it is. Is there a method I can use to make a single call to determine which type it is? Since, at least in Windows, you can't have both a file and a directory with the same name, it seems like there should be a function that accepts a string and returns either "Folder", "File", or "Nothing".
I'm currently doing this, but it doesn't seem like the best way to do it:
If Directory.Exists(mystring) Then
' It's a folder
ElseIf File.Exists(mystring) Then
' It's a file
Else
' It's neither - doesn't exist
End If