You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creates a temporary file, passes it to the given function and removes it immediately after the function completed, even if the function threw an exception.
@@ -1170,16 +1170,16 @@ This doesn't rely on the JVM's `deleteOnExit` handler, therefor the temp file ge
1170
1170
1171
1171
[source,scala]
1172
1172
----
1173
-
withTempFile { file =>
1173
+
os.temp.withFile { file =>
1174
1174
os.write(file, "some content")
1175
1175
}
1176
1176
----
1177
1177
1178
-
==== `os.temp.withTempDir`
1178
+
==== `os.temp.withDir`
1179
1179
1180
1180
[source,scala]
1181
1181
----
1182
-
os.temp.withTempDir[A](fun: Path => A): Try[A]
1182
+
os.temp.withDir[A](fun: Path => A): A
1183
1183
----
1184
1184
1185
1185
Creates a temporary directory, passes it to the given function and removes it immediately after the function completed, even if the function threw an exception.
@@ -1188,7 +1188,7 @@ This doesn't rely on the JVM's `deleteOnExit` handler, therefor the temp dir get
0 commit comments