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.0-RC1-bin-20240917-6e852d2-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