const Int64 INVALID_FILE_ATTRIBUTES = -1;
TODO
// ported http://stackoverflow.com/questions/6218325/how-do-you-check-if-a-directory-exists-on-windows-in-c
public static bool DirectoryExists(string path)
{
int attributes = GetFileAttributes(path);
return (attributes != INVALID_FILE_ATTRIBUTES && ((attributes & FILE_ATTRIBUTE_DIRECTORY) != 0));
}