[−][src]Crate inotify_sys
inotify bindings for the Rust programming language
Please note that these are direct, low-level bindings to C functions that form the inotify C API. Unless you have a specific reason to use this crate, inotify-rs, which is an idiomatic wrapper, is a much better choice.
Usage
In general, inotify usage follows the following pattern:
- Create an inotify instance using
inotify_initorinotify_init1. - Manage watches with
inotify_add_watchandinotify_rm_watch. - Read event using
read. - Close the inotify instance using
close, once you're done.
Please refer to the inotify man page and the rest of this documentation for full details.
Structs
| inotify_event | Describes a file system event |
Constants
| IN_ACCESS | Event: File was accessed |
| IN_ALL_EVENTS | Event: Any event occured |
| IN_ATTRIB | Event: Metadata was changed |
| IN_CLOEXEC | Set the |
| IN_CLOSE | Event: File was closed |
| IN_CLOSE_NOWRITE | Event: Non-writable file or directory was closed |
| IN_CLOSE_WRITE | Event: Writable file was closed |
| IN_CREATE | Event: File or directory was created in watched directory |
| IN_DELETE | Event: File or directory in watched directory was deleted |
| IN_DELETE_SELF | Event: Watched file or directory was deleted |
| IN_DONT_FOLLOW | Don't dereference path, if it is a symbolic link |
| IN_EXCL_UNLINK | Ignore events for children, that have been unlinked from watched directory |
| IN_IGNORED | Indicates that a file system watch was removed |
| IN_ISDIR | Indicates that the subject of an event is a directory |
| IN_MASK_ADD | Update existing watch mask, instead of replacing it |
| IN_MODIFY | Event: File was modified |
| IN_MOVE | Event: File or directory within watched directory was moved |
| IN_MOVED_FROM | Event: File or directory was moved out of watched directory |
| IN_MOVED_TO | Event: File or directory was moved into watched directory |
| IN_MOVE_SELF | Event: Watched file or directory was moved |
| IN_NONBLOCK | Set an inotify instance to non-blocking mode |
| IN_ONESHOT | Remove watch after one event |
| IN_ONLYDIR | Only watch path, if it is a directory |
| IN_OPEN | Event: File or directory was opened |
| IN_Q_OVERFLOW | Indicates that the event queue has overflowed |
| IN_UNMOUNT | Indicates that file system containing a watched object has been unmounted |
Functions
| close⚠ | |
| inotify_add_watch⚠ | Adds or updates an inotify watch |
| inotify_init⚠ | Creates an inotify instance |
| inotify_init1⚠ | Creates an inotify instance |
| inotify_rm_watch⚠ | Removes an inotify watch |
| read⚠ |