code: public String getRootPath(CmsObject cms, String targetUri, String basePath) {
  
          return m_linkSubstitutionHandler.getRootPath(cms, targetUri, basePath);
      }
docs: Returns the resource root path in the OpenCms VFS for the given target URI link, or <code>null</code> in
  case the link points to an external site.<p>
  
  The default implementation applies the following transformations to the link:<ul>
  <li>In case the link starts with a VFS prefix (for example <code>/opencms/opencms</code>,
  this prefix is removed from the result
  <li>In case the link is not a root path, the current site root is appended to the result.<p>
  <li>In case the link is relative, it will be made absolute using the given absolute <code>basePath</code>
  as starting point.<p>
  <li>In case the link contains a server schema (for example <code>http://www.mysite.de/</code>),
  which points to a configured site in OpenCms, the server schema is replaced with
  the root path of the site.<p>
  <li>In case the link points to an external site, or in case it is not a valid URI,
  then <code>null</code> is returned.<p>
  </ul>
  
  Please note the above text describes the default behavior as implemented by
  {@link CmsDefaultLinkSubstitutionHandler}, which can be fully customized using
  the {@link I_CmsLinkSubstitutionHandler} interface.<p>
  
  @param cms the current users OpenCms context
  @param targetUri the target URI link
  @param basePath path to use as base in case the target URI is relative (can be <code>null</code>)
  
  @return the resource root path in the OpenCms VFS for the given target URI link, or <code>null</code> in
  case the link points to an external site
  
  @see I_CmsLinkSubstitutionHandler for the interface that can be used to fully customize the link substitution
  @see CmsDefaultLinkSubstitutionHandler for the default link substitution handler
  
  @since 7.0.2