public static boolean createFolderStructure ( final File pFile , IConfigurationPath [ ] pPaths ) throws TTIOException { boolean returnVal = true ; pFile . mkdirs ( ) ; // creation of folder structure for ( IConfigurationPath paths : pPaths ) { final File toCreate = new File ( pFile , paths . getFile ( ) . getName ( ) ) ; if ( paths . isFolder ( ) ) { returnVal = toCreate . mkdir ( ) ; } else { try { returnVal = toCreate . createNewFile ( ) ; } catch ( final IOException exc ) { throw new TTIOException ( exc ) ; } } if ( ! returnVal ) { break ; } } return returnVal ; }
Creating a folder structure based on a set of paths given as parameter and returning a boolean determining the success .