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

okietreiber.scala-xdg-basedir_2.10.0.1.0.source-code.cache.scala Maven / Gradle / Ivy

The newest version!
package org.freedesktop.basedir

/** $Info
  *
  * @define TypeInfo non-essential (cached) data
  */
object cache extends Basedir {

  private[basedir] def home: String =
    sys.env.getOrElse("XDG_CACHE_HOME", s"${sys.env("HOME")}/.cache")

  def locate(path: String*): Option[String] =
    List(home/path) collectFirst {
      case file if file.toPath.exists => file
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy