@Test public void testCreateDirectoryIfNotExists() throws Exception { final File directory = new File("target/testdir"); directory.delete(); final ILSLog log = TestUtil.createTestLog(); MiscUtil.createDirectoryIfNotExists(directory, log); Assert.assertEquals( "createDirectoryIfNotExists(): expected directory not existing after creating or is not a directory", true, directory.exists() && directory.isDirectory()); }
public static void createDirectoryIfNotExists(final File directory, final ILSLog log) { if (!directory.exists()) { directory.mkdirs(); log.info("created directory " + directory.getAbsoluteFile()); } }
MiscUtil { public static void createDirectoryIfNotExists(final File directory, final ILSLog log) { if (!directory.exists()) { directory.mkdirs(); log.info("created directory " + directory.getAbsoluteFile()); } } }
MiscUtil { public static void createDirectoryIfNotExists(final File directory, final ILSLog log) { if (!directory.exists()) { directory.mkdirs(); log.info("created directory " + directory.getAbsoluteFile()); } } private  MiscUtil(); }
MiscUtil { public static void createDirectoryIfNotExists(final File directory, final ILSLog log) { if (!directory.exists()) { directory.mkdirs(); log.info("created directory " + directory.getAbsoluteFile()); } } private  MiscUtil(); static final String getHexString(final byte[] bytes); static final byte[] getByteArrayFromHexString(final String str); static final LSMessageDigest getLSMessageDigestFromHexString(final String str); static void createDirectoryIfNotExists(final File directory, final ILSLog log); static InputSource getInputSource(final InputStream inputStream); }
MiscUtil { public static void createDirectoryIfNotExists(final File directory, final ILSLog log) { if (!directory.exists()) { directory.mkdirs(); log.info("created directory " + directory.getAbsoluteFile()); } } private  MiscUtil(); static final String getHexString(final byte[] bytes); static final byte[] getByteArrayFromHexString(final String str); static final LSMessageDigest getLSMessageDigestFromHexString(final String str); static void createDirectoryIfNotExists(final File directory, final ILSLog log); static InputSource getInputSource(final InputStream inputStream);  }