src/ie/gmit/sw/ai/FileHandler.java
public void writeFile(String fileName, String text) throws IOException {
		 File file = new File("files/" + fileName + ".txt");
	      file.createNewFile();
	      FileWriter writer = new FileWriter(file); 
	      
	      writer.write(text); 
	      writer.flush();
	      writer.close();
	      System.out.println("File saved as: " + fileName + ".txt");
	}
//writes file to folder "files"
writes file to folder "files"
writes file to folder " files "
public void writeFile(String fileName, String text) throws IOException {
		 File file = new File("files/" + fileName + ".txt");
	      file.createNewFile();
	      FileWriter writer = new FileWriter(file); 
	      writer.write(text); 
	      writer.flush();
	      writer.close();
	      System.out.println("File saved as: " + fileName + ".txt");
	}
public void writeFile ( String fileName , String text ) throws IOException { File file = new File ( "files/" + fileName + ".txt" ) ; file . createNewFile ( ) ; FileWriter writer = new FileWriter ( file ) ; writer . write ( text ) ; writer . flush ( ) ; writer . close ( ) ; System . out . println ( "File saved as: " + fileName + ".txt" ) ; }
writes file to folder "files"
writes file to folder " files "