code: public void deleteResource(String resourceName, String exportpoint) {
  
          File file = getExportPointFile(resourceName, exportpoint);
          if (file.exists() && file.canWrite()) {
              // delete the file (or folder)
              file.delete();
              // also delete empty parent directories
              File parent = file.getParentFile();
              if (parent.canWrite()) {
                  parent.delete();
              }
          }
      }
docs: Deletes a file or a folder in the real file sytem.<p>
  
  If the given resource name points to a folder, then this folder is only deleted if it is empty.
  This is required since the same export point RFS target folder may be used by multiple export points.
  For example, this is usually the case with the <code>/WEB-INF/classes/</code> and
  <code>/WEB-INF/lib/</code> folders which are export point for multiple modules.
  If all resources in the RFS target folder where deleted, uninstalling one module would delete the
  export <code>classes</code> and <code>lib</code> resources of all other modules.<p>
  
  @param resourceName the root path of the resource to be deleted
  @param exportpoint the name of the export point