public static File getVoltDbRoot ( PathsType paths ) { File voltDbRoot ; if ( paths == null || paths . getVoltdbroot ( ) == null || VoltDB . instance ( ) . getVoltDBRootPath ( paths . getVoltdbroot ( ) ) == null ) { voltDbRoot = new VoltFile ( VoltDB . DBROOT ) ; if ( ! voltDbRoot . exists ( ) ) { hostLog . info ( "Creating voltdbroot directory: " + voltDbRoot . getAbsolutePath ( ) ) ; if ( ! voltDbRoot . mkdirs ( ) ) { hostLog . fatal ( "Failed to create voltdbroot directory \"" + voltDbRoot . getAbsolutePath ( ) + "\"" ) ; } } } else { voltDbRoot = new VoltFile ( VoltDB . instance ( ) . getVoltDBRootPath ( paths . getVoltdbroot ( ) ) ) ; if ( ! voltDbRoot . exists ( ) ) { hostLog . info ( "Creating voltdbroot directory: " + voltDbRoot . getAbsolutePath ( ) ) ; if ( ! voltDbRoot . mkdirs ( ) ) { hostLog . fatal ( "Failed to create voltdbroot directory \"" + voltDbRoot . getAbsolutePath ( ) + "\"" ) ; } } } validateDirectory ( "volt root" , voltDbRoot ) ; return voltDbRoot ; }
Get a File object representing voltdbroot . Create directory if missing . Use paths if non - null to get override default location .