code: @Nullable
    private static File _getResourceSource (final String resource, final ClassLoader loader)
    {
      if (resource != null)
      {
        URL url;
        if (loader != null)
        {
          url = loader.getResource (resource);
        }
        else
        {
          url = ClassLoader.getSystemResource (resource);
        }
        return UrlUtils.getResourceRoot (url, resource);
      }
      return null;
    }
docs: Gets the JAR file or directory that contains the specified resource.
  
  @param resource
  The absolute name of the resource to find, may be <code>null</code>.
  @param loader
  The class loader to use for searching the resource, may be
  <code>null</code>.
  @return The absolute path to the resource location or <code>null</code> if
  unknown.