private static void writeFile(File file, String... lines) throws IOException {

		file.delete();

		BufferedWriter bw = new BufferedWriter(new FileWriter(file));
		try {
			for (String line : lines) {
				bw.write(line);
				bw.newLine();
			}
		}
		finally {
			try {
				bw.close();
			}
			catch (IOException e) {
				// we tried
			}
		}
	}
Create KnownUsers file containing the specified list of users.
@param dirPath server root directory
@param userNames list of user names
@throws IOException if there are any exceptions creating users
Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/server/remote/ServerTestUtil.java