code: private void deleteSourceClassesFolder(String targetModulePath, String sourcePathPart, String targetPathPart)
      throws CmsException {
  
          String sourceFirstFolder = sourcePathPart.substring(0, sourcePathPart.indexOf('/'));
          String targetFirstFolder = sourcePathPart.substring(0, sourcePathPart.indexOf('/'));
          if (!sourceFirstFolder.equals(targetFirstFolder)) {
              getCms().deleteResource(
                  targetModulePath + PATH_CLASSES + sourceFirstFolder,
                  CmsResource.DELETE_PRESERVE_SIBLINGS);
              return;
          }
          String[] targetPathParts = CmsStringUtil.splitAsArray(targetPathPart, '/');
          String[] sourcePathParts = CmsStringUtil.splitAsArray(sourcePathPart, '/');
          int sourceLength = sourcePathParts.length;
          int diff = 0;
          for (int i = 0; i < targetPathParts.length; i++) {
              if (sourceLength >= i) {
                  if (!targetPathParts[i].equals(sourcePathParts[i])) {
                      diff = i + 1;
                  }
              }
          }
          String topSourceClassesPath = targetModulePath
              + PATH_CLASSES
              + sourcePathPart.substring(0, sourcePathPart.indexOf('/'))
              + "/";
  
          if (diff != 0) {
              topSourceClassesPath = targetModulePath + PATH_CLASSES;
              for (int i = 0; i < diff; i++) {
                  topSourceClassesPath += sourcePathParts[i] + "/";
              }
          }
          getCms().deleteResource(topSourceClassesPath, CmsResource.DELETE_PRESERVE_SIBLINGS);
      }
docs: Deletes the temporarily copied classes files.<p>
  
  @param targetModulePath the target module path
  @param sourcePathPart the path part of the source module
  @param targetPathPart the target path part
  
  @throws CmsException if something goes wrong