public boolean editFileContent(String filePath, String fileName, String content) {
		filePath = realPath + "\\" + filePath;
		BufferedReader reader = null;
		BufferedWriter writer = null;
		File file = new File(filePath, fileName);
		// if no exited, then create one
		if (!file.exists()) {
			try {
				// getParentFile() !important
				if(!file.getParentFile().mkdirs())
					System.out.println("creating file failed");
			} catch(Exception e) {
				e.printStackTrace();
				return false;
			}
		}
		// continue editing
		try {
			reader = new BufferedReader(new StringReader(content));
			writer = new BufferedWriter(new FileWriter(file));
			char[] buffer = new char[1024];
			int len;
			while ((len = reader.read(buffer)) != -1)
				writer.write(buffer, 0, len);
			writer.flush();
			reader.close();
			writer.close();
		} catch (IOException e) {
			e.printStackTrace();
			return false;
		}
		return true;
	}