public static boolean isPathValid(String path) 
    {
	File f;

	if(path != null)
	    f = new File(path);
	else
	    return false;
	try 
	{
	    @SuppressWarnings("unused")
	    String canonicalPath = f.getCanonicalPath();

	    // Check for invalid characters
	    if(isWindows()){return isValidWinPath(path);}
	    else if(isMac()){return isValidUnixPath(path);}
	    else if(isUnix()){return isValidUnixPath(path);}
	    else return true;

	}
	catch (IOException e) { return false; }
    }