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

rsc.checkbase.CacheUtil.scala Maven / Gradle / Ivy

There is a newer version: 0.0.0-758-7ae5dd31
Show newest version
// Copyright (c) 2017-2018 Twitter, Inc.
// Licensed under the Apache License, Version 2.0 (see LICENSE.md).
package rsc.checkbase

import io.github.soc.directories.ProjectDirectories
import java.nio.file._

trait CacheUtil {
  def cacheDir(name: String, fingerprint: Fingerprint): Path = {
    val project = ProjectDirectories.from("com.twitter", "", name)
    val cacheRoot = project.cacheDir
    val cacheDir = Paths.get(cacheRoot).resolve(fingerprint.toString)
    Files.createDirectories(cacheDir)
    cacheDir
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy