Files
phy/inotify_sys/index.html
Orion Kindel 0ce894e6b0 doc
2025-03-18 10:30:23 -05:00

15 lines
12 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="inotify bindings for the Rust programming language"><title>inotify_sys - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="inotify_sys" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../inotify_sys/index.html">inotify_<wbr>sys</a><span class="version">0.1.5</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#inotify-bindings-for-the-rust-programming-language" title="inotify bindings for the Rust programming language">inotify bindings for the Rust programming language</a><ul><li><a href="#usage" title="Usage">Usage</a></li></ul></li></ul><h3><a href="#structs">Crate Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>inotify_sys</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/inotify_sys/lib.rs.html#1-712">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="inotify-bindings-for-the-rust-programming-language"><a class="doc-anchor" href="#inotify-bindings-for-the-rust-programming-language">§</a>inotify bindings for the Rust programming language</h2>
<p>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,
<a href="https://crates.io/crates/inotify">inotify-rs</a>, which is an idiomatic wrapper, is a much better choice.</p>
<h3 id="usage"><a class="doc-anchor" href="#usage">§</a>Usage</h3>
<p>In general, inotify usage follows the following pattern:</p>
<ol>
<li>Create an inotify instance using <a href="fn.inotify_init.html"><code>inotify_init</code></a> or <a href="fn.inotify_init1.html"><code>inotify_init1</code></a>.</li>
<li>Manage watches with <a href="fn.inotify_add_watch.html"><code>inotify_add_watch</code></a> and <a href="fn.inotify_rm_watch.html"><code>inotify_rm_watch</code></a>.</li>
<li>Read event using <a href="fn.read.html"><code>read</code></a>.</li>
<li>Close the inotify instance using <a href="fn.close.html"><code>close</code></a>, once youre done.</li>
</ol>
<p>Please refer to the <a href="http://man7.org/linux/man-pages/man7/inotify.7.html">inotify man page</a> and the rest of this documentation
for full details.</p>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.inotify_event.html" title="struct inotify_sys::inotify_event">inotify_<wbr>event</a></div><div class="desc docblock-short">Describes a file system event</div></li></ul><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.IN_ACCESS.html" title="constant inotify_sys::IN_ACCESS">IN_<wbr>ACCESS</a></div><div class="desc docblock-short">Event: File was accessed</div></li><li><div class="item-name"><a class="constant" href="constant.IN_ALL_EVENTS.html" title="constant inotify_sys::IN_ALL_EVENTS">IN_<wbr>ALL_<wbr>EVENTS</a></div><div class="desc docblock-short">Event: Any event occured</div></li><li><div class="item-name"><a class="constant" href="constant.IN_ATTRIB.html" title="constant inotify_sys::IN_ATTRIB">IN_<wbr>ATTRIB</a></div><div class="desc docblock-short">Event: Metadata was changed</div></li><li><div class="item-name"><a class="constant" href="constant.IN_CLOEXEC.html" title="constant inotify_sys::IN_CLOEXEC">IN_<wbr>CLOEXEC</a></div><div class="desc docblock-short">Set the <code>FD_CLOEXEC</code> flag for an inotify instance</div></li><li><div class="item-name"><a class="constant" href="constant.IN_CLOSE.html" title="constant inotify_sys::IN_CLOSE">IN_<wbr>CLOSE</a></div><div class="desc docblock-short">Event: File was closed</div></li><li><div class="item-name"><a class="constant" href="constant.IN_CLOSE_NOWRITE.html" title="constant inotify_sys::IN_CLOSE_NOWRITE">IN_<wbr>CLOSE_<wbr>NOWRITE</a></div><div class="desc docblock-short">Event: Non-writable file or directory was closed</div></li><li><div class="item-name"><a class="constant" href="constant.IN_CLOSE_WRITE.html" title="constant inotify_sys::IN_CLOSE_WRITE">IN_<wbr>CLOSE_<wbr>WRITE</a></div><div class="desc docblock-short">Event: Writable file was closed</div></li><li><div class="item-name"><a class="constant" href="constant.IN_CREATE.html" title="constant inotify_sys::IN_CREATE">IN_<wbr>CREATE</a></div><div class="desc docblock-short">Event: File or directory was created in watched directory</div></li><li><div class="item-name"><a class="constant" href="constant.IN_DELETE.html" title="constant inotify_sys::IN_DELETE">IN_<wbr>DELETE</a></div><div class="desc docblock-short">Event: File or directory in watched directory was deleted</div></li><li><div class="item-name"><a class="constant" href="constant.IN_DELETE_SELF.html" title="constant inotify_sys::IN_DELETE_SELF">IN_<wbr>DELETE_<wbr>SELF</a></div><div class="desc docblock-short">Event: Watched file or directory was deleted</div></li><li><div class="item-name"><a class="constant" href="constant.IN_DONT_FOLLOW.html" title="constant inotify_sys::IN_DONT_FOLLOW">IN_<wbr>DONT_<wbr>FOLLOW</a></div><div class="desc docblock-short">Dont dereference path, if it is a symbolic link</div></li><li><div class="item-name"><a class="constant" href="constant.IN_EXCL_UNLINK.html" title="constant inotify_sys::IN_EXCL_UNLINK">IN_<wbr>EXCL_<wbr>UNLINK</a></div><div class="desc docblock-short">Ignore events for children, that have been unlinked from watched directory</div></li><li><div class="item-name"><a class="constant" href="constant.IN_IGNORED.html" title="constant inotify_sys::IN_IGNORED">IN_<wbr>IGNORED</a></div><div class="desc docblock-short">Indicates that a file system watch was removed</div></li><li><div class="item-name"><a class="constant" href="constant.IN_ISDIR.html" title="constant inotify_sys::IN_ISDIR">IN_<wbr>ISDIR</a></div><div class="desc docblock-short">Indicates that the subject of an event is a directory</div></li><li><div class="item-name"><a class="constant" href="constant.IN_MASK_ADD.html" title="constant inotify_sys::IN_MASK_ADD">IN_<wbr>MASK_<wbr>ADD</a></div><div class="desc docblock-short">Update existing watch mask, instead of replacing it</div></li><li><div class="item-name"><a class="constant" href="constant.IN_MODIFY.html" title="constant inotify_sys::IN_MODIFY">IN_<wbr>MODIFY</a></div><div class="desc docblock-short">Event: File was modified</div></li><li><div class="item-name"><a class="constant" href="constant.IN_MOVE.html" title="constant inotify_sys::IN_MOVE">IN_MOVE</a></div><div class="desc docblock-short">Event: File or directory within watched directory was moved</div></li><li><div class="item-name"><a class="constant" href="constant.IN_MOVED_FROM.html" title="constant inotify_sys::IN_MOVED_FROM">IN_<wbr>MOVED_<wbr>FROM</a></div><div class="desc docblock-short">Event: File or directory was moved out of watched directory</div></li><li><div class="item-name"><a class="constant" href="constant.IN_MOVED_TO.html" title="constant inotify_sys::IN_MOVED_TO">IN_<wbr>MOVED_<wbr>TO</a></div><div class="desc docblock-short">Event: File or directory was moved into watched directory</div></li><li><div class="item-name"><a class="constant" href="constant.IN_MOVE_SELF.html" title="constant inotify_sys::IN_MOVE_SELF">IN_<wbr>MOVE_<wbr>SELF</a></div><div class="desc docblock-short">Event: Watched file or directory was moved</div></li><li><div class="item-name"><a class="constant" href="constant.IN_NONBLOCK.html" title="constant inotify_sys::IN_NONBLOCK">IN_<wbr>NONBLOCK</a></div><div class="desc docblock-short">Set an inotify instance to non-blocking mode</div></li><li><div class="item-name"><a class="constant" href="constant.IN_ONESHOT.html" title="constant inotify_sys::IN_ONESHOT">IN_<wbr>ONESHOT</a></div><div class="desc docblock-short">Remove watch after one event</div></li><li><div class="item-name"><a class="constant" href="constant.IN_ONLYDIR.html" title="constant inotify_sys::IN_ONLYDIR">IN_<wbr>ONLYDIR</a></div><div class="desc docblock-short">Only watch path, if it is a directory</div></li><li><div class="item-name"><a class="constant" href="constant.IN_OPEN.html" title="constant inotify_sys::IN_OPEN">IN_OPEN</a></div><div class="desc docblock-short">Event: File or directory was opened</div></li><li><div class="item-name"><a class="constant" href="constant.IN_Q_OVERFLOW.html" title="constant inotify_sys::IN_Q_OVERFLOW">IN_<wbr>Q_<wbr>OVERFLOW</a></div><div class="desc docblock-short">Indicates that the event queue has overflowed</div></li><li><div class="item-name"><a class="constant" href="constant.IN_UNMOUNT.html" title="constant inotify_sys::IN_UNMOUNT">IN_<wbr>UNMOUNT</a></div><div class="desc docblock-short">Indicates that file system containing a watched object has been unmounted</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.close.html" title="fn inotify_sys::close">close</a><sup title="unsafe function"></sup></div></li><li><div class="item-name"><a class="fn" href="fn.inotify_add_watch.html" title="fn inotify_sys::inotify_add_watch">inotify_<wbr>add_<wbr>watch</a><sup title="unsafe function"></sup></div><div class="desc docblock-short">Adds or updates an inotify watch</div></li><li><div class="item-name"><a class="fn" href="fn.inotify_init.html" title="fn inotify_sys::inotify_init">inotify_<wbr>init</a><sup title="unsafe function"></sup></div><div class="desc docblock-short">Creates an inotify instance</div></li><li><div class="item-name"><a class="fn" href="fn.inotify_init1.html" title="fn inotify_sys::inotify_init1">inotify_<wbr>init1</a><sup title="unsafe function"></sup></div><div class="desc docblock-short">Creates an inotify instance</div></li><li><div class="item-name"><a class="fn" href="fn.inotify_rm_watch.html" title="fn inotify_sys::inotify_rm_watch">inotify_<wbr>rm_<wbr>watch</a><sup title="unsafe function"></sup></div><div class="desc docblock-short">Removes an inotify watch</div></li><li><div class="item-name"><a class="fn" href="fn.read.html" title="fn inotify_sys::read">read</a><sup title="unsafe function"></sup></div></li></ul></section></div></main></body></html>