private File createNewFile ( String path ) throws IOException { // In windows, pathnames with spaces are returned as %20 if ( path . contains ( "%20" ) ) path = path . replaceAll ( "%20" , " " ) ; File newFile = new File ( path ) ; if ( ! newFile . exists ( ) && ! newFile . createNewFile ( ) ) { throw new BundlingProcessException ( "Unable to create a temporary file at " + path ) ; } if ( LOGGER . isDebugEnabled ( ) ) LOGGER . debug ( "Created file: " + newFile . getCanonicalPath ( ) ) ; return newFile ; }
Creates a file . If dir is not created for some reason a runtimeexception is thrown .