Method
readFile
(String s, boolean append)
Source from the content-addressed store, hash-verified
| 64 | private static String readFile(String s, boolean append) { |
| 65 | try (BufferedReader r = new BufferedReader(new FileReader(new File(s)))) { |
| 66 | String line = ""; |
| 67 | while (r.ready()) { |
| 68 | line += r.readLine() + "\n"; |
| 69 | } |
| 70 | |
| 71 | if (append) line += "\n//# sourceURL=" + s; |
| 72 | return line; |
| 73 | |
| 74 | } catch (IOException e) { |
| 75 | e.printStackTrace(); |
| 76 | } |
| 77 | return ""; |
| 78 | } |
| 79 | |
| 80 | int frameLast = 0; |
| 81 | |
| 82 | @HiddenInAutocomplete |
| 83 | public void loaded() { |
| 84 | loaded("http://localhost:" + find(ServerSupport.server, both()).findFirst().get().port + "/init"); |
Tested by
no test coverage detected