code: func (container *Container) GetResourcePath(path string) (string, error) {
  	if container.BaseFS == nil {
  		return "", errors.New("GetResourcePath: BaseFS of container " + container.ID + " is unexpectedly nil")
  	}
  	// IMPORTANT - These are paths on the OS where the daemon is running, hence
  	// any filepath operations must be done in an OS agnostic way.
  	r, e := container.BaseFS.ResolveScopedPath(path, false)
  
  	// Log this here on the daemon side as there's otherwise no indication apart
  	// from the error being propagated all the way back to the client. This makes
  	// debugging significantly easier and clearly indicates the error comes from the daemon.
  	if e != nil {
  		logrus.Errorf("Failed to ResolveScopedPath BaseFS %s path %s %s\n", container.BaseFS.Path(), path, e)
  	}
  	return r, e
  }
docs: // GetResourcePath evaluates `path` in the scope of the container's BaseFS, with proper path
  // sanitisation. Symlinks are all scoped to the BaseFS of the container, as
  // though the container's BaseFS was `/`.
  //
  // The BaseFS of a container is the host-facing path which is bind-mounted as
  // `/` inside the container. This method is essentially used to access a
  // particular path inside the container as though you were a process in that
  // container.
  //
  // NOTE: The returned path is *only* safely scoped inside the container's BaseFS
  //       if no component of the returned path changes (such as a component
  //       symlinking to a different path) between using this method and using the
  //       path. See symlink.FollowSymlinkInScope for more details.