Implement async event streaming

This commit is contained in:
T. R. Bernstein
2026-03-11 23:45:14 +01:00
parent 5247d898cd
commit 58a05e9b61
10 changed files with 280 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
public struct RawInotifyEvent: Sendable, Hashable, CustomStringConvertible {
public let watchDescriptor: Int32
public let mask: InotifyEventMask
public let cookie: UInt32
public let name: String
public var description: String {
var parts = ["RawInotifyEvent(wd: \(watchDescriptor), mask: \(mask), name: \"\(name)\""]
if cookie != 0 { parts.append("cookie: \(cookie)") }
return parts.joined(separator: ", ") + ")"
}
}