private void cleanIndexDirectory(String path) throws IOException
   {
      SecurityHelper.doPrivilegedIOExceptionAction((PrivilegedExceptionAction<Void>) () -> {
         File newIndexFolder = new File(path);
         if(newIndexFolder.exists())
         {
            DirectoryHelper.removeDirectory(newIndexFolder);
         }
         return null;
      });
   }
private void cleanIndexDirectory ( String path ) throws IOException { SecurityHelper . doPrivilegedIOExceptionAction ( ( PrivilegedExceptionAction < Void > ) ( ) -> { File newIndexFolder = new File ( path ) ; if ( newIndexFolder . exists ( ) ) { DirectoryHelper . removeDirectory ( newIndexFolder ) ; } return null ; } ) ; }
remove index directory if exist
@param path index directory path
@throws IOException