17 lines
302 B
Nim
17 lines
302 B
Nim
|
|
||
|
import
|
||
|
preserves
|
||
|
|
||
|
type
|
||
|
InotifyMessage* {.preservesRecord: "inotify".} = object
|
||
|
`path`*: string
|
||
|
`event`*: Symbol
|
||
|
`cookie`*: BiggestInt
|
||
|
`name`*: string
|
||
|
|
||
|
proc `$`*(x: InotifyMessage): string =
|
||
|
`$`(toPreserve(x))
|
||
|
|
||
|
proc encode*(x: InotifyMessage): seq[byte] =
|
||
|
encode(toPreserve(x))
|