File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1013,6 +1013,19 @@ extension LinuxContainer {
10131013 }
10141014 }
10151015
1016+ // Perform filesystem operations in the container.
1017+ public func filesystemOperation( operation: FilesystemOperation , path: String ) async throws {
1018+ try await self . state. withLock {
1019+ let state = try $0. startedState ( " filesystemOperation " )
1020+ try await state. vm. withAgent { agent in
1021+ guard let vminitd = agent as? Vminitd else {
1022+ throw ContainerizationError ( . unsupported, message: " filesystemOperation requires Vminitd agent " )
1023+ }
1024+ try await vminitd. filesystemOperation ( operation: operation, path: path)
1025+ }
1026+ }
1027+ }
1028+
10161029 private func relayUnixSocket(
10171030 socket: UnixSocketConfiguration ,
10181031 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