private void checkAndCreateDir(String pathname) {
            int lastSlash = pathname.lastIndexOf("/");
            if (lastSlash > -1) {
                String pathExcludingFilename = pathname.substring(0, lastSlash);
                File filepath = new File(pathExcludingFilename);
                if (!filepath.exists()) {
                    filepath.mkdirs();
                }
            }
        }
Find next rotation after specified time.

@param now the specified time; if zero, current time is used.
@return the next rotation time
container-core/src/main/java/com/yahoo/container/logging/LogFileHandler.java