pl.touk.nussknacker.engine.util.config.URIExtensions.scala Maven / Gradle / Ivy
The newest version!
package pl.touk.nussknacker.engine.util.config
import java.io.File
import java.net.URI
trait URIExtensions {
implicit class ExtendedURI(uri: URI) {
def withFileSchemeDefault: URI = if (uri.isAbsolute) uri else new File(uri.getSchemeSpecificPart).toURI
def withTrailingSlash: URI = if (uri.getPath.endsWith("/")) uri else URI.create(uri.toString + "/")
}
}
object URIExtensions extends URIExtensions
© 2015 - 2025 Weber Informatics LLC | Privacy Policy