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

com.swoval.files.platform.package.scala Maven / Gradle / Ivy

The newest version!
package com.swoval.files

import java.nio.file.{ Files => JFiles, Paths => JPaths }

package object platform {
  def makeExecutor(name: String): Executor = ExecutorServiceWrapper.make(name)
  def makeScheduledExecutor(name: String): ScheduledExecutor =
    ExecutorServiceWrapper.makeScheduled(name)
  object pathCompanion extends PathCompanion {
    def apply(parts: String*): Path = JvmPath.apply(parts: _*)
    def createTempFile(dir: Path, prefix: String): Path =
      JvmPath(JFiles.createTempFile(JPaths.get(dir.name), prefix, "").toRealPath())

    def createTempDirectory(): Path = JvmPath(JFiles.createTempDirectory("dir").toRealPath())

    def createTempDirectory(dir: Path, prefix: String): Path =
      JvmPath(JFiles.createTempDirectory(JPaths.get(dir.name), prefix).toRealPath())
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy