MCPcopy
hub / github.com/arduino/Arduino / SketchFile

Method SketchFile

arduino-core/src/processing/app/SketchFile.java:94–100  ·  view source on GitHub ↗

Create a new SketchFile @param sketch The sketch this file belongs to @param file The file this SketchFile represents @param primary Whether this file is the primary file of the sketch

(Sketch sketch, File file)

Source from the content-addressed store, hash-verified

92 * Whether this file is the primary file of the sketch
93 */
94 public SketchFile(Sketch sketch, File file) {
95 this.sketch = sketch;
96 this.file = file;
97 FileUtils.SplitFile split = FileUtils.splitFilename(file);
98 this.primary = split.basename.equals(sketch.getFolder().getName())
99 && Sketch.SKETCH_EXTENSIONS.contains(split.extension);
100 }
101
102 /**
103 * Set an in-memory storage for this file's text, that will be queried

Callers

nothing calls this directly

Calls 4

splitFilenameMethod · 0.95
getNameMethod · 0.65
getFolderMethod · 0.65
equalsMethod · 0.45

Tested by

no test coverage detected