autodoc.git
/
traditional_manual
/
chapter_9.html
version
»
Context lines:
10
20
40
80
file
none
3
autodoc.git/traditional_manual/chapter_9.html:646:
filtered from the result.</p> </dd> <dt class='head--doc'>See also</dt> <dd class='body--doc'><p><code>open()</code></p> </dd></dl> <hr /> <dl class='group--doc'> <dt class='head--type'><span class='homogen--type'>Method</span>
-
<span class='homogen--name'><b>notify</b></span>
-
</dt>
-
<dd><p><code><code class='datatype'>void</code> <b><span class='method'>notify</span>(</b><code class='datatype'>void</code>|<code class='datatype'>int</code> <code class='argument'>notification</code>, <code class='datatype'>function</code>(<code class='datatype'>void</code>:<code class='datatype'>void</code>) <code class='argument'>callback</code><b>)</b></code></p></dd>
-
-
<dt class='head--doc'>Description</dt>
-
<dd class='body--doc'><p>Receive notification when change occur within the fd.
-
To use, create a Stdio.File object of a directory like
-
Stdio.File(".") and then call notify() with the appropriate
-
parameters.</p>
-
</dd>
-
<dt class='head--doc'>Note</dt>
-
<dd class='body--doc'><p>When a program registers for some notification, only the first notification
-
will be received unless DN_MULTISHOT is specified as part of the
-
notification argument.</p>
-
</dd>
-
<dt class='head--doc'>Note</dt>
-
<dd class='body--doc'><p>At present, this function is Linux-specific and requires a kernel which
-
supports the F_NOTIFY fcntl() call.</p>
-
</dd>
-
<dt class='head--doc'><span id='p-notification'></span>Parameter <code class='parameter'>notification</code></dt>
-
<dd></dd><dd class='body--doc'><p>What to notify the callback of. See the Stdio.DN_* constants for more
-
information about possible notifications.</p>
-
</dd>
-
<dt class='head--doc'><span id='p-callback'></span>Parameter <code class='parameter'>callback</code></dt>
-
<dd></dd><dd class='body--doc'><p>Function which should be called when notification is received. The
-
function gets the signal used to indicate the notification as its
-
argument and shouldn't return anyting.</p>
-
</dd></dl>
-
-
-
<hr />
-
<dl class='group--doc'>
-
<dt class='head--type'><span class='homogen--type'>Method</span>
+
<span class='homogen--name'><b>open</b></span> </dt> <dd><p><code><code class='datatype'>int</code> <b><span class='method'>open</span>(</b><code class='datatype'>string</code> <code class='argument'>filename</code>, <code class='datatype'>string</code> <code class='argument'>mode</code><b>)</b></code><br> <code><code class='datatype'>int</code> <b><span class='method'>open</span>(</b><code class='datatype'>string</code> <code class='argument'>filename</code>, <code class='datatype'>string</code> <code class='argument'>mode</code>, <code class='datatype'>int</code> <code class='argument'>mask</code><b>)</b></code></p></dd> <dt class='head--doc'>Description</dt> <dd class='body--doc'><p>Open a file for read, write or append. The parameter <code>mode</code> should contain one or more of the following letters:</p> <table class='box'><tr><td><code><code class='key'>"r"</code></code></td><td><p>Open file for reading.</p> </td></tr>
autodoc.git/traditional_manual/chapter_9.html:4666:
<dt class='head--doc'>Description</dt> <dd class='body--doc'><p>Size used in various places to divide incoming or outgoing data into chunks.</p> </dd></dl> <hr /> <dl class='group--doc'> <dt class='head--type'><span class='homogen--type'>Constant</span>
-
<span class='homogen--name'><b>DN_ACCESS</b></span>
-
</dt>
-
<dd><p><code><code class='datatype'>constant</code> Stdio.<code class='constant'>DN_ACCESS</code></code></p></dd>
-
-
<dt class='head--doc'>Description</dt>
-
<dd class='body--doc'><p>Used in <code>File.notify()</code> to get a callback when files
-
within a directory are accessed.</p>
-
</dd></dl>
-
-
-
<hr />
-
<dl class='group--doc'>
-
<dt class='head--type'><span class='homogen--type'>Constant</span>
-
<span class='homogen--name'><b>DN_ATTRIB</b></span>
-
</dt>
-
<dd><p><code><code class='datatype'>constant</code> Stdio.<code class='constant'>DN_ATTRIB</code></code></p></dd>
-
-
<dt class='head--doc'>Description</dt>
-
<dd class='body--doc'><p>Used in <code>File.notify()</code> to get a callback when attributes
-
of files within a directory are changed.</p>
-
</dd></dl>
-
-
-
<hr />
-
<dl class='group--doc'>
-
<dt class='head--type'><span class='homogen--type'>Constant</span>
-
<span class='homogen--name'><b>DN_CREATE</b></span>
-
</dt>
-
<dd><p><code><code class='datatype'>constant</code> Stdio.<code class='constant'>DN_CREATE</code></code></p></dd>
-
-
<dt class='head--doc'>Description</dt>
-
<dd class='body--doc'><p>Used in <code>File.notify()</code> to get a callback when new
-
files are created within a directory.</p>
-
</dd></dl>
-
-
-
<hr />
-
<dl class='group--doc'>
-
<dt class='head--type'><span class='homogen--type'>Constant</span>
-
<span class='homogen--name'><b>DN_DELETE</b></span>
-
</dt>
-
<dd><p><code><code class='datatype'>constant</code> Stdio.<code class='constant'>DN_DELETE</code></code></p></dd>
-
-
<dt class='head--doc'>Description</dt>
-
<dd class='body--doc'><p>Used in <code>File.notify()</code> to get a callback when files
-
are deleted within a directory.</p>
-
</dd></dl>
-
-
-
<hr />
-
<dl class='group--doc'>
-
<dt class='head--type'><span class='homogen--type'>Constant</span>
-
<span class='homogen--name'><b>DN_MODIFY</b></span>
-
</dt>
-
<dd><p><code><code class='datatype'>constant</code> Stdio.<code class='constant'>DN_MODIFY</code></code></p></dd>
-
-
<dt class='head--doc'>Description</dt>
-
<dd class='body--doc'><p>Used in <code>File.notify()</code> to get a callback when files
-
within a directory are modified.</p>
-
</dd></dl>
-
-
-
<hr />
-
<dl class='group--doc'>
-
<dt class='head--type'><span class='homogen--type'>Constant</span>
-
<span class='homogen--name'><b>DN_MULTISHOT</b></span>
-
</dt>
-
<dd><p><code><code class='datatype'>constant</code> Stdio.<code class='constant'>DN_MULTISHOT</code></code></p></dd>
-
-
<dt class='head--doc'>Description</dt>
-
<dd class='body--doc'><p>Used in <code>File.notify()</code>. If DN_MULTISHOT is used, signals will
-
be sent for all notifications the program has registred for. Otherwise
-
only the first event the program is listening for will be received and
-
then the program must reregister for the events to receive futher events.</p>
-
</dd></dl>
-
-
-
<hr />
-
<dl class='group--doc'>
-
<dt class='head--type'><span class='homogen--type'>Constant</span>
-
<span class='homogen--name'><b>DN_RENAME</b></span>
-
</dt>
-
<dd><p><code><code class='datatype'>constant</code> Stdio.<code class='constant'>DN_RENAME</code></code></p></dd>
-
-
<dt class='head--doc'>Description</dt>
-
<dd class='body--doc'><p>Used in <code>File.notify()</code> to get a callback when files
-
within a directory are renamed.</p>
-
</dd></dl>
-
-
-
<hr />
-
<dl class='group--doc'>
-
<dt class='head--type'><span class='homogen--type'>Constant</span>
+
<span class='homogen--name'><b>NOTE_ATTRIB</b></span> </dt> <dd><p><code><code class='datatype'>constant</code> <code class='datatype'>int</code> Stdio.<code class='constant'>NOTE_ATTRIB</code></code></p></dd> </dl> <hr /> <dl class='group--doc'> <dt class='head--type'><span class='homogen--type'>Constant</span> <span class='homogen--name'><b>NOTE_DELETE</b></span>