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

bigquery4s.package.scala Maven / Gradle / Ivy

There is a newer version: 0.9
Show newest version
import scala.language.reflectiveCalls

package object bigquery4s {

  type Closable = { def close() }

  /**
   * Closes the resource finally.
   */
  def using[R <: Closable, A](resource: R)(f: R => A): A = {
    try {
      f(resource)
    } finally {
      try {
        resource.close()
      } catch {
        case ignore: Exception =>
      }
    }
  }

  lazy val homeDir: String = System.getProperty("user.home")

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy