code: @Override
    public InternalResource chroot(InternalResource resource)
    {
      String path = resource.getPath();
  
      // when it is a directory, we simply use the provided resource
      if(resource.isDirectory())
      {
        return doCreateResourceProvider(path).getRootResource();
      }
      else
      {
        // when not a directory, we do a chroot to the parent and then we return the resource
        // that points to it
        return (InternalResource) resource.chroot("..").createRelative(resource.getFilename());
      }
    }
docs: Returns a new resource with the root resource set to this resource.
  
  @return the new resource