public void deleteChildren ( String path , boolean recursive ) throws IOException { List < String > childNames = null ; try { childNames = registryOperations . list ( path ) ; } catch ( PathNotFoundException e ) { return ; } for ( String childName : childNames ) { String child = join ( path , childName ) ; registryOperations . delete ( child , recursive ) ; } }
Delete the children of a path - but not the path itself . It is not an error if the path does not exist