MCPcopy Create free account
hub / github.com/Whiley/WhileyCompiler / readWhileyFile

Method readWhileyFile

src/main/java/wyc/Compiler.java:244–251  ·  view source on GitHub ↗

Read a Whiley source file from the file system. @param id @param dir @param filename @return @throws IOException

(File dir, Trie path)

Source from the content-addressed store, hash-verified

242 * @throws IOException
243 */
244 public static WhileyFile readWhileyFile(File dir, Trie path) throws IOException {
245 // First, determine filename
246 String filename = path.toNativeString() + ".whiley";
247 // Second Read the file
248 try (FileInputStream fin = new FileInputStream(new File(dir, filename))) {
249 return new WhileyFile(path, fin.readAllBytes());
250 }
251 }
252 /**
253 * Read a WyilFile from the file system.
254 *

Callers 1

runMethod · 0.95

Calls 1

toNativeStringMethod · 0.80

Tested by

no test coverage detected