Code example for File

Methods: existstoString

0
		} 
	} 
 
	private Option<File> findManifestInSpecifiedPath() {
		String path = processingEnv.getOptions().get(ANDROID_MANIFEST_FILE_OPTION);
		File androidManifestFile = new File(path);
		Messager messager = processingEnv.getMessager();
		if (!androidManifestFile.exists()) {
			messager.printMessage(Kind.ERROR, "Could not find the AndroidManifest.xml file in specified path : " + path);
			return Option.absent(); 
		} else { 
			messager.printMessage(Kind.NOTE, "AndroidManifest.xml file found: " + androidManifestFile.toString());
		} 
		return Option.of(androidManifestFile);
	} 
 
	/** 
	 * We use a dirty trick to find the AndroidManifest.xml file, since it's not 
	 * available in the classpath. The idea is quite simple : create a fake 
	 * class file, retrieve its URI, and start going up in parent folders to 
Connect your IDE to all the code out there  Get Codota for Java