public static boolean makeFile(File file, boolean directory)
	{
		if(file.exists())
		{
			if(file.isDirectory() != directory)
			{
				file.delete();
			}
			else
			{
				return false;
			}
		}
		if(!file.exists())
		{
			File f = directory ? file : file.getParentFile();
			if(f != null && !f.exists())
			{
				f.mkdirs();
			}
			if(!directory)
			{
				try
				{
					file.createNewFile();
				}
				catch(IOException e)
				{
					e.printStackTrace();
				}
			}
		}
		return true;
	}