@Test(expected = IOException.class) public void testIOExceptionSaveFile() throws IOException { resource = aeshContext.getCurrentWorkingDirectory().newInstance("."); FileUtils.saveFile(resource, "foo", false); }
public static void saveFile(Resource file, String text, boolean append) throws IOException { if(file.isDirectory()) { throw new IOException(file+": Is a directory"); } try (OutputStream out = file.write(append);) { out.write(text.getBytes()); } }
FileUtils { public static void saveFile(Resource file, String text, boolean append) throws IOException { if(file.isDirectory()) { throw new IOException(file+": Is a directory"); } try (OutputStream out = file.write(append);) { out.write(text.getBytes()); } } }
FileUtils { public static void saveFile(Resource file, String text, boolean append) throws IOException { if(file.isDirectory()) { throw new IOException(file+": Is a directory"); } try (OutputStream out = file.write(append);) { out.write(text.getBytes()); } }  }
FileUtils { public static void saveFile(Resource file, String text, boolean append) throws IOException { if(file.isDirectory()) { throw new IOException(file+": Is a directory"); } try (OutputStream out = file.write(append);) { out.write(text.getBytes()); } }  static void saveFile(Resource file, String text, boolean append); }
FileUtils { public static void saveFile(Resource file, String text, boolean append) throws IOException { if(file.isDirectory()) { throw new IOException(file+": Is a directory"); } try (OutputStream out = file.write(append);) { out.write(text.getBytes()); } }  static void saveFile(Resource file, String text, boolean append);  }