File Input & Output - Wait-For-It-123/logiCAD GitHub Wiki

This package is used for creating, loading, and manipulating files.

public class CustomFilter extends FileFilter - this class is used to determine file extensions of a file (to filter out only those that contain a .lca file extension)

public class FileInputAndOutput - this class contains two important methods:

  1. public static Boolean saveStateToFile(String state, String path) - writes a string to a file using path as filename.
  2. public static String loadFileToString(String path) - reads from a .lca file line by line and makes a string from the text.