diff options
Diffstat (limited to 'lib/posix/inotify.nim')
-rw-r--r-- | lib/posix/inotify.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/posix/inotify.nim b/lib/posix/inotify.nim index db698c59c..7c3cb46c5 100644 --- a/lib/posix/inotify.nim +++ b/lib/posix/inotify.nim @@ -75,11 +75,11 @@ proc inotify_rm_watch*(fd: cint; wd: cint): cint {.cdecl, iterator inotify_events*(evs: pointer, n: int): ptr InotifyEvent = ## Abstract the packed buffer interface to yield event object pointers. - ## - ## .. code-block:: Nim + ## ```Nim ## var evs = newSeq[byte](8192) # Already did inotify_init+add_watch ## while (let n = read(fd, evs[0].addr, 8192); n) > 0: # read forever ## for e in inotify_events(evs[0].addr, n): echo e[].len # echo name lens + ## ``` var ev: ptr InotifyEvent = cast[ptr InotifyEvent](evs) var n = n while n > 0: |