Read a Whiley source file from the file system. @param id @param dir @param filename @return @throws IOException
(File dir, Trie path)
| 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 | * |