Possible Duplicate:
.NET How to check if path is a file and not a directory?
Can anyone think of a good way of telling whether a file system object path equates to a a file or a directory?
I did have the following method:
public static bool PathIsFile(this string fullPath)
{
return (Path.GetExtension(fullPath).Length > 0);
}
But some files have no extension and some directories have a dot in their name so this is not cutting it.