mirror of
https://github.com/apple/swift-system
synced 2026-11-29 05:24:25 +00:00
Update Sources/System/FilePath/FilePathTemp.swift
Co-authored-by: Karoy Lorentey <klorentey@apple.com>
This commit is contained in:
1 parent
e293300430
commit
bcc7f6d569
1 file changed
+4
-2
@@ -9,8 +9,10 @@
|
||||
|
||||
// MARK: - API
|
||||
|
||||
public func withTemporaryPath<R>(basename: FilePath.Component,
|
||||
_ body: (FilePath) throws -> R) throws -> R {
|
||||
public func withTemporaryPath<R>(
|
||||
basename: FilePath.Component,
|
||||
_ body: (FilePath) throws -> R
|
||||
) throws -> R {
|
||||
let temporaryDir = try createUniqueTemporaryDirectory(basename: basename)
|
||||
defer {
|
||||
try? recursiveRemove(at: temporaryDir)
|
||||
|
||||
Reference in new issue
Block a user