Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better examples for std/inotify #23415

Open
wants to merge 10 commits into
base: devel
Choose a base branch
from

Conversation

Archargelod
Copy link

@Archargelod Archargelod commented Mar 17, 2024

Previous example wouldn't run unless std/posix was imported and it wasn't mentioned anywhere in the docs.

Other changes in the example:

  • replaced magic number with constant MaxWatches .
  • changed seq buffer to array, because length is already constant + pointer is a bit nicer: addr seq[0] vs addr arr
  • added example for getting a cstring name value from InotifyEvent struct with explicit cast.
  • added a bit more description to inotify_init1 (copied from man inotify(7))

lib/posix/inotify.nim Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants