code: public static boolean isInsideProject(List<String> projectResources, String resourcename) {
  
          for (int i = (projectResources.size() - 1); i >= 0; i--) {
              String projectResource = projectResources.get(i);
              if (CmsResource.isFolder(projectResource)) {
                  if (resourcename.startsWith(projectResource)) {
                      // folder - check only the prefix
                      return true;
                  }
              } else {
                  if (resourcename.equals(projectResource)) {
                      // file - check the full path
                      return true;
                  }
              }
          }
          return false;
      }
docs: Checks if the full resource name (including the site root) of a resource matches
  any of the project resources of a project.<p>
  
  @param projectResources a List of project resources as Strings
  @param resourcename the resource to check
  @return true, if the resource is "inside" the project resources