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

com.iheart.playSwagger.PathValidator.scala Maven / Gradle / Ivy

The newest version!
package com.iheart.playSwagger

import java.nio.file.{InvalidPathException, Paths}

object PathValidator {
  def isValid(path: String): Boolean = {
    try {
      Paths.get(path)
      true
    } catch {
      case _: InvalidPathException | _: NullPointerException => false
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy