@Test public void testCreateParentFolder() { String tempDir = TestUtils.createTempDir(); String suff = tempDir.substring( tempDir.lastIndexOf( File.separator ) + 1 ); tempDir += File.separator + suff + File.separator + suff; assertTrue( "Dir should be created", FileUtil.createParentFolder( getClass(), tempDir, true, new LogChannel( this ), null ) ); File fl = new File( tempDir.substring( 0, tempDir.lastIndexOf( File.separator ) ) ); assertTrue( "Dir should exist", fl.exists() ); fl.delete(); new File( tempDir ).delete(); }
final LogChannelFileWriter logChannelFileWriter; try { FileUtil.createParentFolder( AddTransServlet.class, realLogFilename, transExecutionConfiguration .isCreateParentFolder(), trans.getLogChannel(), trans ); logChannelFileWriter =
String realLogFilename = transExecutionConfiguration.getLogFileName(); try { FileUtil.createParentFolder( AddTransServlet.class, realLogFilename, transExecutionConfiguration .isCreateParentFolder(), trans.getLogChannel(), trans ); final LogChannelFileWriter logChannelFileWriter =
if ( !FileUtil.createParentFolder( PKG, realLogFilename, createParentFolder, this.getLogChannel(), this ) ) { result.setNrErrors( 1 ); result.setResult( false );