diff --git a/Sources/Containerization/ContainerManager.swift b/Sources/Containerization/ContainerManager.swift index 77c43b93..099eef49 100644 --- a/Sources/Containerization/ContainerManager.swift +++ b/Sources/Containerization/ContainerManager.swift @@ -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) }