All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dotty.tools.scaladoc.DRI.scala Maven / Gradle / Ivy

There is a newer version: 3.6.3-RC1-bin-20241114-6a7d5d3-NIGHTLY
Show newest version
package dotty.tools.scaladoc

import java.nio.file.Path
import dotty.tools.scaladoc.util.Escape._

val staticFileSymbolUUID = "___staticFile___"

val topLevelDri = DRI("/")

// we may need target...
final case class DRI(
  location: String,
  anchor: String = "",
  externalLink: Option[String] = None,
  symbolUUID: String = ""
):
  def withNoExternalLink = copy(externalLink = None)

  def isStaticFile = symbolUUID == staticFileSymbolUUID

  def asFileLocation: String = escapeUrl(location).replace(".", "/")

object DRI:
  def forPath(path: Path) =
    DRI(location = path.toString, symbolUUID = staticFileSymbolUUID)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy