Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Sources/Containerization/ContainerManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,17 @@ public struct ContainerManager: Sendable {
}
}

/// Performs the cleanup of a container.
/// Releases network resources for a container.
///
/// - Parameter id: The container ID.
public mutating func delete(_ id: String) throws {
public mutating func releaseNetwork(_ id: String) throws {
try self.network?.release(id)
}

/// Releases network resources and removes all files for a container.
/// - Parameter id: The container ID.
public mutating func delete(_ id: String) throws {
try self.releaseNetwork(id)
let path = containerRoot.appendingPathComponent(id)
try FileManager.default.removeItem(at: path)
}
Expand Down