File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 11package os
22
33import java .nio .file .attribute .{FileAttribute , PosixFilePermissions }
4- import scala .util .Using
4+ import os .util .Using
55
66/**
77 * Create temporary files and directories. [[withFile ]] and [[withDir ]]
Original file line number Diff line number Diff line change 11/*
2+ * Verbatim copy of scala.util.Using - only copied here because we're also targeting
3+ * scala 2.12 and 2.11, which don't ship that by default. Changed the package to
4+ * os.util to avoid any clashes in dowstream projects.
5+ *
26 * Scala (https://www.scala-lang.org)
37 *
48 * Copyright EPFL and Lightbend, Inc.
1014 * additional information regarding copyright ownership.
1115 */
1216
13- package scala .util
17+ package os .util
1418
19+ import scala .util .Try
1520import scala .util .control .{ControlThrowable , NonFatal }
1621
1722/** A utility for performing automatic resource management. It can be used to perform an
Original file line number Diff line number Diff line change 11package test .os
22
33import os ._
4- import scala .util .Using
4+ // if running with scala 2.13+, this can be the regular `scala.util.Using`
5+ import os .util .Using
56import utest .{assert => _ , _ }
67
78object TempPathTests extends TestSuite {
You can’t perform that action at this time.
0 commit comments