MCPcopy Index your code
hub / github.com/benfry/processing4 / readSettings

Method readSettings

app/src/processing/app/Util.java:107–118  ·  view source on GitHub ↗

Read from a file with a bunch of attribute/value pairs that are separated by = and ignore comments with #. As of 4.0.2, set allowHex to true if hex colors are used in the file. This will disable support for comments that begin later in the line. If allowHex is false, then comments can appear later o

(File inputFile, boolean allowHex)

Source from the content-addressed store, hash-verified

105 * necessary for the contribution .properties files. Blank lines are ignored.
106 */
107 static public StringDict readSettings(File inputFile, boolean allowHex) {
108 if (!inputFile.exists()) {
109 Messages.err(inputFile + " does not exist inside readSettings()");
110 return null;
111 }
112 String[] lines = PApplet.loadStrings(inputFile);
113 if (lines == null) {
114 System.err.println("Could not read " + inputFile);
115 return null;
116 }
117 return readSettings(inputFile.toString(), lines, allowHex);
118 }
119
120
121 /**

Callers 8

renderImageMethod · 0.95
updateFlaggedMethod · 0.95
findContribMethod · 0.95
rewritePropertiesFileMethod · 0.95
loadPropertiesMethod · 0.95
LocalContributionMethod · 0.95
parseContribListMethod · 0.95

Calls 8

errMethod · 0.95
loadStringsMethod · 0.95
trimMethod · 0.95
setMethod · 0.95
printlnMethod · 0.45
toStringMethod · 0.45
containsMethod · 0.45
trimMethod · 0.45

Tested by

no test coverage detected