<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Miscellaneous commands</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.1"><link rel="home" href="index.html" title="Websh Reference 3.6.0b5"><link rel="up" href="index.html" title="Websh Reference 3.6.0b5"><link rel="prev" href="apache_module_specific_commands.html" title="Apache module specific commands"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Miscellaneous commands</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apache_module_specific_commands.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </td></tr></table><hr></div><div class="section" title="Miscellaneous commands"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="misc_commands"></a>Miscellaneous commands</h2></div></div></div><div class="section" title="web::match"><div class="titlepage"><div><div><h3 class="title"><a name="web::match"></a><span style="font-family:monospace"><span class="command"><strong>web::match</strong></span></span></h3></div></div></div><p style="width:90%"> | |
</p><div class="cmdsynopsis"><span style="background:#bbbbff"><span style="font-weight:bold"><code class="command">web::match</code></span> <em class="replaceable"><code>result</code></em> <em class="replaceable"><code>listToBeSearched</code></em> <em class="replaceable"><code>searchFor</code></em></span></div><p style="width:90%"> | |
In case <tt><em class="replaceable"><code>searchFor</code></em></tt> exists in | |
<tt><em class="replaceable"><code>listToBeSearched</code></em></tt>, | |
<span style="font-family:monospace"><span class="command"><strong>web::match</strong></span></span> returns | |
<tt><em class="replaceable"><code>result</code></em></tt>, otherwise an empty string. | |
</p><p style="width:90%"> | |
<span style="font-family:monospace"><span class="command"><strong>web::match</strong></span></span> treats listToBeSearched as a list. | |
Thus, <span class="emphasis"><em><span style="font-family:monospace"><span class="command"><strong>web::match "ok" {tv dvd vcr} dvd</strong></span></span></em></span> | |
will return <span class="emphasis"><em>ok</em></span>. | |
</p></div><div class="section" title="web::tempfile"><div class="titlepage"><div><div><h3 class="title"><a name="web::tempfile"></a><span style="font-family:monospace"><span class="command"><strong>web::tempfile</strong></span></span></h3></div></div></div><p style="width:90%"> | |
</p><div class="cmdsynopsis"><span style="background:#bbbbff"><span style="font-weight:bold"><code class="command">web::tempfile</code></span> ?<em class="replaceable"><code>options</code></em>?</span></div><p style="width:90%"> | |
Options are <tt>-path <em class="replaceable"><code>path</code></em></tt>, | |
<tt>-prefix <em class="replaceable"><code>prefix</code></em></tt>, and <tt>-remove</tt>. | |
</p><div class="cmdsynopsis"><span style="background:#bbbbff"><span style="font-weight:bold"><code class="command">web::tempfile</code></span> ?-path | |
<em class="replaceable"><code>path</code></em> | |
? ?-prefix | |
<em class="replaceable"><code>prefix</code></em> | |
?</span></div><p style="width:90%"> | |
Returns a unique name of a temporary file in the default | |
temp directory or the directory given with | |
<em class="replaceable"><code>path</code></em>. | |
The name can be prefixed with <em class="replaceable"><code>prefix</code></em>. | |
The maximum of guaranteed unique names per application is system | |
dependent. This command just returns the name of a file. It is the | |
programmers job to handle the file, for example to open | |
it. Note that Websh keeps an internal list of all file | |
names generated with <span style="font-family:monospace"><span class="command"><strong>web::tempfile</strong></span></span> and will | |
attempt to delete all files when the interpreter dies. | |
</p><div class="cmdsynopsis"><span style="background:#bbbbff"><span style="font-weight:bold"><code class="command">web::tempfile</code></span> -remove</span></div><p style="width:90%"> | |
Attempts to clean up all temporary | |
files previously created using <span style="font-family:monospace"><span class="command"><strong>web::tempfile</strong></span></span> and | |
resets the internal list of these file names. | |
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apache_module_specific_commands.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">Apache module specific commands </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html> |