File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -968,6 +968,19 @@ extension LinuxContainer {
968968 }
969969 }
970970
971+ // Perform filesystem operations in the container.
972+ public func filesystemOperation( operation: FilesystemOperation , path: String ) async throws {
973+ try await self . state. withLock {
974+ let state = try $0. startedState ( " filesystemOperation " )
975+ try await state. vm. withAgent { agent in
976+ guard let vminitd = agent as? Vminitd else {
977+ throw ContainerizationError ( . unsupported, message: " filesystemOperation requires Vminitd agent " )
978+ }
979+ try await vminitd. filesystemOperation ( operation: operation, path: path)
980+ }
981+ }
982+ }
983+
971984 private func relayUnixSocket(
972985 socket: UnixSocketConfiguration ,
973986 relayManager: UnixSocketRelayManager ,
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public struct WriteFileFlags {
2525 public var create = false
2626}
2727
28- public enum FilesystemOperation {
28+ public enum FilesystemOperation : Sendable {
2929 case freeze
3030 case thaw
3131}
You can’t perform that action at this time.
0 commit comments