1
0
Fork 0
cl-sites/asdf.common-lisp.dev/uiop.html
2023-11-12 11:34:18 +01:00

2913 lines
256 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.8, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- UIOP is a part of https://common-lisp.net/project/asdf/ (ASDF),
which is released under an MIT style License:
Copyright (C) 2001-2019 Daniel Barlow and contributors.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -->
<title>UIOP Manual</title>
<meta name="description" content="UIOP Manual">
<meta name="keywords" content="UIOP Manual">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="uiop.html#Top" rel="start" title="Top">
<link href="uiop.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="uiop.html#Introduction" rel="next" title="Introduction">
<style type="text/css">
<!--
a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em}
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
span:hover a.copiable-anchor {visibility: visible}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en">
<h1 class="settitle" align="center">UIOP Manual</h1>
<div class="top" id="Top">
<div class="header">
<p>
Next: <a href="uiop.html#Introduction" accesskey="n" rel="next">Introduction</a> &nbsp; [<a href="uiop.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<span id="UIOP"></span><h1 class="top">UIOP</h1>
<p>UIOP is a part of <a href="https://common-lisp.net/project/asdf/">ASDF</a>,
which is released under an MIT style License:
</p>
<blockquote>
<p>Copyright &copy; 2001-2019 Daniel Barlow and contributors.
</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the &quot;Software&quot;), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
</p>
<p>The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
</p>
<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
</p></blockquote>
<div class="Contents_element" id="SEC_Contents">
<h2 class="contents-heading">Table of Contents</h2>
<div class="contents">
<ul class="no-bullet">
<li><a id="toc-Introduction-1" href="uiop.html#Introduction">1 Introduction</a></li>
<li><a id="toc-UIOP_002fPACKAGE-1" href="uiop.html#UIOP_002fPACKAGE">2 UIOP/PACKAGE</a></li>
<li><a id="toc-UIOP_002fCOMMON_002dLISP-1" href="uiop.html#UIOP_002fCOMMON_002dLISP">3 UIOP/COMMON-LISP</a></li>
<li><a id="toc-UIOP_002fUTILITY-1" href="uiop.html#UIOP_002fUTILITY">4 UIOP/UTILITY</a></li>
<li><a id="toc-UIOP_002fVERSION-1" href="uiop.html#UIOP_002fVERSION">5 UIOP/VERSION</a></li>
<li><a id="toc-UIOP_002fOS-1" href="uiop.html#UIOP_002fOS">6 UIOP/OS</a></li>
<li><a id="toc-UIOP_002fPATHNAME-1" href="uiop.html#UIOP_002fPATHNAME">7 UIOP/PATHNAME</a></li>
<li><a id="toc-UIOP_002fFILESYSTEM-1" href="uiop.html#UIOP_002fFILESYSTEM">8 UIOP/FILESYSTEM</a></li>
<li><a id="toc-UIOP_002fSTREAM-1" href="uiop.html#UIOP_002fSTREAM">9 UIOP/STREAM</a></li>
<li><a id="toc-UIOP_002fIMAGE-1" href="uiop.html#UIOP_002fIMAGE">10 UIOP/IMAGE</a></li>
<li><a id="toc-UIOP_002fLISP_002dBUILD-1" href="uiop.html#UIOP_002fLISP_002dBUILD">11 UIOP/LISP-BUILD</a></li>
<li><a id="toc-UIOP_002fLAUNCH_002dPROGRAM-1" href="uiop.html#UIOP_002fLAUNCH_002dPROGRAM">12 UIOP/LAUNCH-PROGRAM</a></li>
<li><a id="toc-UIOP_002fRUN_002dPROGRAM-1" href="uiop.html#UIOP_002fRUN_002dPROGRAM">13 UIOP/RUN-PROGRAM</a></li>
<li><a id="toc-UIOP_002fCONFIGURATION-1" href="uiop.html#UIOP_002fCONFIGURATION">14 UIOP/CONFIGURATION</a></li>
<li><a id="toc-UIOP_002fBACKWARD_002dDRIVER-1" href="uiop.html#UIOP_002fBACKWARD_002dDRIVER">15 UIOP/BACKWARD-DRIVER</a></li>
<li><a id="toc-UIOP_002fDRIVER-1" href="uiop.html#UIOP_002fDRIVER">16 UIOP/DRIVER</a></li>
</ul>
</div>
</div>
<hr>
<div class="chapter" id="Introduction">
<div class="header">
<p>
Next: <a href="uiop.html#UIOP_002fPACKAGE" accesskey="n" rel="next">UIOP/PACKAGE</a>, Previous: <a href="uiop.html#Top" accesskey="p" rel="prev">UIOP</a>, Up: <a href="uiop.html#Top" accesskey="u" rel="up">UIOP</a> &nbsp; [<a href="uiop.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<span id="Introduction-1"></span><h2 class="chapter">1 Introduction</h2>
<p>UIOP is the portability layer of ASDF. It provides utilities that
abstract over discrepancies between implementations, between operating
systems, and between what the standard provides and what programmers
actually need, to write portable Common Lisp programs.
</p>
<p>It is organized by topic in many files, each of which defines its own package
according to its topic: e.g <samp>pathname.lisp</samp>
will define package <code>uiop/pathname</code> and contain utilities related to
the handling of pathname objects.
All exported symbols are reexported in a convenience package <code>uiop</code>,
except for those from <code>uiop/common-lisp</code>.
We recommend package <code>uiop</code> be used to access all the symbols.
</p>
<p>The following API reference is auto-generated from the docstrings in
the code. The chapters are arranged in dependency order.
</p>
<hr>
</div>
<div class="chapter" id="UIOP_002fPACKAGE">
<div class="header">
<p>
Next: <a href="uiop.html#UIOP_002fCOMMON_002dLISP" accesskey="n" rel="next">UIOP/COMMON-LISP</a>, Previous: <a href="uiop.html#Introduction" accesskey="p" rel="prev">Introduction</a>, Up: <a href="uiop.html#Top" accesskey="u" rel="up">UIOP</a> &nbsp; [<a href="uiop.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<span id="UIOP_002fPACKAGE-1"></span><h2 class="chapter">2 UIOP/PACKAGE</h2>
<span id="Function-uiop_002fpackage_003afind_002dpackage_002a"></span><dl class="def">
<dt id="index-find_002dpackage_002a"><span class="category">Function: </span><span><strong>find-package*</strong> <em>package-designator &amp;optional errorp</em><a href='uiop.html#index-find_002dpackage_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpackage_003afind_002dpackage_002a"></span>
<p>Like <code>cl:find-package</code>, but by default raises a <code>uiop:no-such-package-error</code> if the
package is not found.
</p></dd></dl>
<span id="Function-uiop_002fpackage_003afind_002dsymbol_002a"></span><dl class="def">
<dt id="index-find_002dsymbol_002a"><span class="category">Function: </span><span><strong>find-symbol*</strong> <em>name package-designator &amp;optional error</em><a href='uiop.html#index-find_002dsymbol_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpackage_003afind_002dsymbol_002a"></span>
<p>Find a symbol in a package of given string&rsquo;ified <code>name</code>;
unlike <code>cl:find-symbol</code>, work well with &rsquo;modern&rsquo; case sensitive syntax
by letting you supply a symbol or keyword for the name;
also works well when the package is not present.
If optional <code>error</code> argument is <code>nil</code>, return <code>nil</code> instead of an error
when the symbol is not found.
</p></dd></dl>
<span id="Function-uiop_002fpackage_003arehome_002dsymbol"></span><dl class="def">
<dt id="index-rehome_002dsymbol"><span class="category">Function: </span><span><strong>rehome-symbol</strong> <em>symbol package-designator</em><a href='uiop.html#index-rehome_002dsymbol' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpackage_003arehome_002dsymbol"></span>
<p>Changes the home package of a symbol, also leaving it present in its old home if any
</p></dd></dl>
<span id="Function-uiop_002fpackage_003asymbol_002dcall"></span><dl class="def">
<dt id="index-symbol_002dcall"><span class="category">Function: </span><span><strong>symbol-call</strong> <em>package name &amp;rest args</em><a href='uiop.html#index-symbol_002dcall' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpackage_003asymbol_002dcall"></span>
<p>Call a function associated with symbol of given name in given package,
with given <code>args</code>. Useful when the call is read before the package is loaded,
or when loading the package is optional.
</p></dd></dl>
<span id="Macro-uiop_002fpackage_003adefine_002dpackage"></span><dl class="def">
<dt id="index-define_002dpackage"><span class="category">Macro: </span><span><strong>define-package</strong> <em>package &amp;rest clauses</em><a href='uiop.html#index-define_002dpackage' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpackage_003adefine_002dpackage"></span>
<p><code>define-package</code> takes a <code>package</code> and a number of <code>clauses</code>, of the form
(<code>keyword</code> . <code>args</code>).
<code>define-package</code> supports the following keywords:
<code>shadow</code>, <code>shadowing-import-from</code>, <code>import-from</code>, <code>export</code>, <code>intern</code>, <code>nicknames</code>,
<code>documentation</code> <code>--</code> as per <code>cl:defpackage</code>.
<code>use</code> <code>--</code> as per <code>cl:defpackage</code>, but if neither <code>use</code>, <code>use-reexport</code>, <code>mix</code>,
nor <code>mix-reexport</code> is supplied, then it is equivalent to specifying
(<code>:use</code> <code>:common-lisp</code>). This is unlike <code>cl:defpackage</code> for which the
behavior of a form without <code>use</code> is implementation-dependent.
<code>recycle</code> <code>--</code> Recycle the package&rsquo;s exported symbols from the specified packages,
in order. For every symbol scheduled to be exported by the <code>define-package</code>,
either through an <code>:export</code> option or a <code>:reexport</code> option, if the symbol exists in
one of the <code>:recycle</code> packages, the first such symbol is re-homed to the package
being defined.
For the sake of idempotence, it is important that the package being defined
should appear in first position if it already exists, and even if it doesn&rsquo;t,
ahead of any package that is not going to be deleted afterwards and never
created again. In short, except for special cases, always make it the first
package on the list if the list is not empty.
<code>mix</code> <code>--</code> Takes a list of package designators. <code>mix</code> behaves like
(<code>:use</code> <code>pkg1</code> <code>pkg2</code> ... PKGn) but additionally uses <code>:shadowing-import-from</code> to
resolve conflicts in favor of the first found symbol. It may still yield
an error if there is a conflict with an explicitly <code>:import-from</code> symbol.
<code>reexport</code> <code>--</code> Takes a list of package designators. For each package, p, in the list,
export symbols with the same name as those exported from p. Note that in the case
of shadowing, etc. the symbols with the same name may not be the same symbols.
<code>unintern</code> <code>--</code> Remove symbols here from <code>package</code>. Note that this is primarily useful
when *redefining* a previously-existing package in the current image (e.g., when
upgrading ASDF). Most programmers will have no use for this option.
<code>local-nicknames</code> <code>--</code> If the host implementation supports package local nicknames
(check for the <code>:package-local-nicknames</code> feature), then this should be a list of
nickname and package name pairs. Using this option will cause an error if the
host CL implementation does not support it.
<code>use-reexport</code>, <code>mix-reexport</code> <code>--</code> Use or mix the specified packages as per the <code>use</code> or
<code>mix</code> directives, and reexport their contents as per the <code>reexport</code> directive.
</p></dd></dl>
<hr>
</div>
<div class="chapter" id="UIOP_002fCOMMON_002dLISP">
<div class="header">
<p>
Next: <a href="uiop.html#UIOP_002fUTILITY" accesskey="n" rel="next">UIOP/UTILITY</a>, Previous: <a href="uiop.html#UIOP_002fPACKAGE" accesskey="p" rel="prev">UIOP/PACKAGE</a>, Up: <a href="uiop.html#Top" accesskey="u" rel="up">UIOP</a> &nbsp; [<a href="uiop.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<span id="UIOP_002fCOMMON_002dLISP-1"></span><h2 class="chapter">3 UIOP/COMMON-LISP</h2>
<p><code>uiop/common-lisp</code> lets you paper over various sub-standard
implementations.
</p>
<p>This package reexports all the symbols in <code>common-lisp</code> package.
</p>
<hr>
</div>
<div class="chapter" id="UIOP_002fUTILITY">
<div class="header">
<p>
Next: <a href="uiop.html#UIOP_002fVERSION" accesskey="n" rel="next">UIOP/VERSION</a>, Previous: <a href="uiop.html#UIOP_002fCOMMON_002dLISP" accesskey="p" rel="prev">UIOP/COMMON-LISP</a>, Up: <a href="uiop.html#Top" accesskey="u" rel="up">UIOP</a> &nbsp; [<a href="uiop.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<span id="UIOP_002fUTILITY-1"></span><h2 class="chapter">4 UIOP/UTILITY</h2>
<span id="Function-uiop_002futility_003aaccess_002dat_002dcount"></span><dl class="def">
<dt id="index-access_002dat_002dcount"><span class="category">Function: </span><span><strong>access-at-count</strong> <em>at</em><a href='uiop.html#index-access_002dat_002dcount' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003aaccess_002dat_002dcount"></span>
<p>From an <code>at</code> specification, extract a <code>count</code> of maximum number
of sub-objects to read as per <code>access-at</code>
</p></dd></dl>
<span id="Function-uiop_002futility_003aaccess_002dat"></span><dl class="def">
<dt id="index-access_002dat"><span class="category">Function: </span><span><strong>access-at</strong> <em>object at</em><a href='uiop.html#index-access_002dat' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003aaccess_002dat"></span>
<p>Given an <code>object</code> and an <code>at</code> specifier, list of successive accessors,
call each accessor on the result of the previous calls.
An accessor may be an integer, meaning a call to <code>elt</code>,
a keyword, meaning a call to <code>getf</code>,
<code>nil</code>, meaning identity,
a function or other symbol, meaning itself,
or a list of a function designator and arguments, interpreted as per <code>ensure-function</code>.
As a degenerate case, the <code>at</code> specifier may be an atom of a single such accessor
instead of a list.
</p></dd></dl>
<span id="Function-uiop_002futility_003abase_002dstring_002dp"></span><dl class="def">
<dt id="index-base_002dstring_002dp"><span class="category">Function: </span><span><strong>base-string-p</strong> <em>string</em><a href='uiop.html#index-base_002dstring_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003abase_002dstring_002dp"></span>
<p>Does the <code>string</code> only contain BASE-CHARs?
</p></dd></dl>
<span id="Function-uiop_002futility_003aboolean_002dto_002dfeature_002dexpression"></span><dl class="def">
<dt id="index-boolean_002dto_002dfeature_002dexpression"><span class="category">Function: </span><span><strong>boolean-to-feature-expression</strong> <em>value</em><a href='uiop.html#index-boolean_002dto_002dfeature_002dexpression' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003aboolean_002dto_002dfeature_002dexpression"></span>
<p>Converts a boolean <code>value</code> to a form suitable for testing with <code>#+</code>.
</p></dd></dl>
<span id="Function-uiop_002futility_003acall_002dfunction"></span><dl class="def">
<dt id="index-call_002dfunction"><span class="category">Function: </span><span><strong>call-function</strong> <em>function-spec &amp;rest arguments</em><a href='uiop.html#index-call_002dfunction' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003acall_002dfunction"></span>
<p>Call the function designated by <code>function-spec</code> as per <code>ensure-function</code>,
with the given <code>arguments</code>
</p></dd></dl>
<span id="Function-uiop_002futility_003acall_002dfunctions"></span><dl class="def">
<dt id="index-call_002dfunctions"><span class="category">Function: </span><span><strong>call-functions</strong> <em>function-specs</em><a href='uiop.html#index-call_002dfunctions' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003acall_002dfunctions"></span>
<p>For each function in the list <code>function-specs</code>, in order, call the function as per <code>call-function</code>
</p></dd></dl>
<span id="Function-uiop_002futility_003acall_002dwith_002dmuffled_002dconditions"></span><dl class="def">
<dt id="index-call_002dwith_002dmuffled_002dconditions"><span class="category">Function: </span><span><strong>call-with-muffled-conditions</strong> <em>thunk conditions</em><a href='uiop.html#index-call_002dwith_002dmuffled_002dconditions' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003acall_002dwith_002dmuffled_002dconditions"></span>
<p>calls the <code>thunk</code> in a context where the <code>conditions</code> are muffled
</p></dd></dl>
<span id="Function-uiop_002futility_003acoerce_002dclass"></span><dl class="def">
<dt id="index-coerce_002dclass"><span class="category">Function: </span><span><strong>coerce-class</strong> <em>class &amp;key package super error</em><a href='uiop.html#index-coerce_002dclass' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003acoerce_002dclass"></span>
<p>Coerce <code>class</code> to a class that is subclass of <code>super</code> if specified,
or invoke <code>error</code> handler as per <code>call-function</code>.
</p>
<p>A keyword designates the name a symbol, which when found in either <code>package</code>, designates a class.
<code>--</code> for backward compatibility, <code>*package*</code> is also accepted for now, but this may go in the future.
A string is read as a symbol while in <code>package</code>, the symbol designates a class.
</p>
<p>A class object designates itself.
<code>nil</code> designates itself (no class).
A symbol otherwise designates a class by name.
</p></dd></dl>
<span id="Function-uiop_002futility_003aemptyp"></span><dl class="def">
<dt id="index-emptyp"><span class="category">Function: </span><span><strong>emptyp</strong> <em>x</em><a href='uiop.html#index-emptyp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003aemptyp"></span>
<p>Predicate that is true for an empty sequence
</p></dd></dl>
<span id="Function-uiop_002futility_003aensure_002dfunction"></span><dl class="def">
<dt id="index-ensure_002dfunction"><span class="category">Function: </span><span><strong>ensure-function</strong> <em>fun &amp;key package</em><a href='uiop.html#index-ensure_002dfunction' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003aensure_002dfunction"></span>
<p>Coerce the object <code>fun</code> into a function.
</p>
<p>If <code>fun</code> is a <code>function</code>, return it.
If the <code>fun</code> is a non-sequence literal constant, return constantly that,
i.e. for a boolean keyword character number or pathname.
Otherwise if <code>fun</code> is a non-literally constant symbol, return its <code>fdefinition</code>.
If <code>fun</code> is a <code>cons</code>, return the function that applies its <code>car</code>
to the appended list of the rest of its <code>cdr</code> and the arguments,
unless the <code>car</code> is <code>lambda</code>, in which case the expression is evaluated.
If <code>fun</code> is a string, <code>read</code> a form from it in the specified <code>package</code> (default: CL)
and <code>eval</code> that in a (<code>function</code> ...) context.
</p></dd></dl>
<span id="Function-uiop_002futility_003aensure_002dgethash"></span><dl class="def">
<dt id="index-ensure_002dgethash"><span class="category">Function: </span><span><strong>ensure-gethash</strong> <em>key table default</em><a href='uiop.html#index-ensure_002dgethash' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003aensure_002dgethash"></span>
<p>Lookup the <code>table</code> for a <code>key</code> as by <code>gethash</code>, but if not present,
call the (possibly constant) function designated by <code>default</code> as per <code>call-function</code>,
set the corresponding entry to the result in the table.
Return two values: the entry after its optional computation, and whether it was found
</p></dd></dl>
<span id="Function-uiop_002futility_003afind_002dstandard_002dcase_002dsymbol"></span><dl class="def">
<dt id="index-find_002dstandard_002dcase_002dsymbol"><span class="category">Function: </span><span><strong>find-standard-case-symbol</strong> <em>name-designator package-designator &amp;optional error</em><a href='uiop.html#index-find_002dstandard_002dcase_002dsymbol' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003afind_002dstandard_002dcase_002dsymbol"></span>
<p>Find a symbol designated by <code>name-designator</code> in a package designated by <code>package-designator</code>,
where <code>standard-case-symbol-name</code> is used to transform them if these designators are strings.
If optional <code>error</code> argument is <code>nil</code>, return <code>nil</code> instead of an error when the symbol is not found.
</p></dd></dl>
<span id="Function-uiop_002futility_003afirst_002dchar"></span><dl class="def">
<dt id="index-first_002dchar"><span class="category">Function: </span><span><strong>first-char</strong> <em>s</em><a href='uiop.html#index-first_002dchar' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003afirst_002dchar"></span>
<p>Return the first character of a non-empty string <code>s</code>, or <code>nil</code>
</p></dd></dl>
<span id="Function-uiop_002futility_003afrob_002dsubstrings"></span><dl class="def">
<dt id="index-frob_002dsubstrings"><span class="category">Function: </span><span><strong>frob-substrings</strong> <em>string substrings &amp;optional frob</em><a href='uiop.html#index-frob_002dsubstrings' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003afrob_002dsubstrings"></span>
<p>for each substring in <code>substrings</code>, find occurrences of it within <code>string</code>
that don&rsquo;t use parts of matched occurrences of previous strings, and
<code>frob</code> them, that is to say, remove them if <code>frob</code> is <code>nil</code>,
replace by <code>frob</code> if <code>frob</code> is a <code>string</code>, or if <code>frob</code> is a <code>function</code>,
call <code>frob</code> with the match and a function that emits a string in the output.
Return a string made of the parts not omitted or emitted by <code>frob</code>.
</p></dd></dl>
<span id="Function-uiop_002futility_003alast_002dchar"></span><dl class="def">
<dt id="index-last_002dchar"><span class="category">Function: </span><span><strong>last-char</strong> <em>s</em><a href='uiop.html#index-last_002dchar' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003alast_002dchar"></span>
<p>Return the last character of a non-empty string <code>s</code>, or <code>nil</code>
</p></dd></dl>
<span id="Function-uiop_002futility_003alexicographic_003c_003d"></span><dl class="def">
<dt id="index-lexicographic_003c_003d"><span class="category">Function: </span><span><strong>lexicographic&lt;=</strong> <em>element&lt; x y</em><a href='uiop.html#index-lexicographic_003c_003d' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003alexicographic_003c_003d"></span>
<p>Lexicographically compare two lists of using the function element&lt; to compare elements.
element&lt; is a strict total order; the resulting order on <code>x</code> and <code>y</code> will be a non-strict total order.
</p></dd></dl>
<span id="Function-uiop_002futility_003alexicographic_003c"></span><dl class="def">
<dt id="index-lexicographic_003c"><span class="category">Function: </span><span><strong>lexicographic&lt;</strong> <em>element&lt; x y</em><a href='uiop.html#index-lexicographic_003c' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003alexicographic_003c"></span>
<p>Lexicographically compare two lists of using the function element&lt; to compare elements.
element&lt; is a strict total order; the resulting order on <code>x</code> and <code>y</code> will also be strict.
</p></dd></dl>
<span id="Function-uiop_002futility_003alist_002dto_002dhash_002dset"></span><dl class="def">
<dt id="index-list_002dto_002dhash_002dset"><span class="category">Function: </span><span><strong>list-to-hash-set</strong> <em>list &amp;aux (h (make-hash-table test (quote equal)))</em><a href='uiop.html#index-list_002dto_002dhash_002dset' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003alist_002dto_002dhash_002dset"></span>
<p>Convert a <code>list</code> into hash-table that has the same elements when viewed as a set,
up to the given equality <code>test</code>
</p></dd></dl>
<span id="Function-uiop_002futility_003aload_002duiop_002ddebug_002dutility"></span><dl class="def">
<dt id="index-load_002duiop_002ddebug_002dutility"><span class="category">Function: </span><span><strong>load-uiop-debug-utility</strong> <em>&amp;key package utility-file</em><a href='uiop.html#index-load_002duiop_002ddebug_002dutility' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003aload_002duiop_002ddebug_002dutility"></span>
<p>Load the <code>uiop</code> debug utility in given <code>package</code> (default <code>*package*</code>).
Beware: The utility is located by <code>eval</code>&rsquo;uating the <code>utility-file</code> form (default <code>*uiop-debug-utility*</code>).
</p></dd></dl>
<span id="Function-uiop_002futility_003amatch_002dany_002dcondition_002dp"></span><dl class="def">
<dt id="index-match_002dany_002dcondition_002dp"><span class="category">Function: </span><span><strong>match-any-condition-p</strong> <em>condition conditions</em><a href='uiop.html#index-match_002dany_002dcondition_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003amatch_002dany_002dcondition_002dp"></span>
<p>match <code>condition</code> against any of the patterns of <code>conditions</code> supplied
</p></dd></dl>
<span id="Function-uiop_002futility_003amatch_002dcondition_002dp"></span><dl class="def">
<dt id="index-match_002dcondition_002dp"><span class="category">Function: </span><span><strong>match-condition-p</strong> <em>x condition</em><a href='uiop.html#index-match_002dcondition_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003amatch_002dcondition_002dp"></span>
<p>Compare received <code>condition</code> to some pattern <code>x:</code>
a symbol naming a condition class,
a simple vector of length <code>2</code>, arguments to find-symbol* with result as above,
or a string describing the format-control of a simple-condition.
</p></dd></dl>
<span id="Function-uiop_002futility_003anot_002dimplemented_002derror"></span><dl class="def">
<dt id="index-not_002dimplemented_002derror"><span class="category">Function: </span><span><strong>not-implemented-error</strong> <em>functionality &amp;optional format-control &amp;rest format-arguments</em><a href='uiop.html#index-not_002dimplemented_002derror' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003anot_002dimplemented_002derror"></span>
<p>Signal an error because some <code>functionality</code> is not implemented in the current version
of the software on the current platform; it may or may not be implemented in different combinations
of version of the software and of the underlying platform. Optionally, report a formatted error
message.
</p></dd></dl>
<span id="Function-uiop_002futility_003aparameter_002derror"></span><dl class="def">
<dt id="index-parameter_002derror"><span class="category">Function: </span><span><strong>parameter-error</strong> <em>format-control functionality &amp;rest format-arguments</em><a href='uiop.html#index-parameter_002derror' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003aparameter_002derror"></span>
<p>Signal an error because some <code>functionality</code> or its specific implementation on a given underlying
platform does not accept a given parameter or combination of parameters. Report a formatted error
message, that takes the functionality as its first argument (that can be skipped with ~*).
</p></dd></dl>
<span id="Function-uiop_002futility_003aparse_002dbody"></span><dl class="def">
<dt id="index-parse_002dbody"><span class="category">Function: </span><span><strong>parse-body</strong> <em>body &amp;key documentation whole</em><a href='uiop.html#index-parse_002dbody' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003aparse_002dbody"></span>
<p>Parses <code>body</code> into (values remaining-forms declarations doc-string).
Documentation strings are recognized only if <code>documentation</code> is true.
Syntax errors in body are signalled and <code>whole</code> is used in the signal
arguments when given.
</p></dd></dl>
<span id="Function-uiop_002futility_003areduce_002fstrcat"></span><dl class="def">
<dt id="index-reduce_002fstrcat"><span class="category">Function: </span><span><strong>reduce/strcat</strong> <em>strings &amp;key key start end</em><a href='uiop.html#index-reduce_002fstrcat' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003areduce_002fstrcat"></span>
<p>Reduce a list as if by <code>strcat</code>, accepting <code>key</code> <code>start</code> and <code>end</code> keywords like <code>reduce</code>.
<code>nil</code> is interpreted as an empty string. A character is interpreted as a string of length one.
</p></dd></dl>
<span id="Function-uiop_002futility_003aregister_002dhook_002dfunction"></span><dl class="def">
<dt id="index-register_002dhook_002dfunction"><span class="category">Function: </span><span><strong>register-hook-function</strong> <em>variable hook &amp;optional call-now-p</em><a href='uiop.html#index-register_002dhook_002dfunction' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003aregister_002dhook_002dfunction"></span>
<p>Push the <code>hook</code> function (a designator as per <code>ensure-function</code>) onto the hook <code>variable</code>.
When <code>call-now-p</code> is true, also call the function immediately.
</p></dd></dl>
<span id="Function-uiop_002futility_003aremove_002dplist_002dkey"></span><dl class="def">
<dt id="index-remove_002dplist_002dkey"><span class="category">Function: </span><span><strong>remove-plist-key</strong> <em>key plist</em><a href='uiop.html#index-remove_002dplist_002dkey' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003aremove_002dplist_002dkey"></span>
<p>Remove a single key from a plist
</p></dd></dl>
<span id="Function-uiop_002futility_003aremove_002dplist_002dkeys"></span><dl class="def">
<dt id="index-remove_002dplist_002dkeys"><span class="category">Function: </span><span><strong>remove-plist-keys</strong> <em>keys plist</em><a href='uiop.html#index-remove_002dplist_002dkeys' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003aremove_002dplist_002dkeys"></span>
<p>Remove a list of keys from a plist
</p></dd></dl>
<span id="Function-uiop_002futility_003asplit_002dstring"></span><dl class="def">
<dt id="index-split_002dstring"><span class="category">Function: </span><span><strong>split-string</strong> <em>string &amp;key max separator</em><a href='uiop.html#index-split_002dstring' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003asplit_002dstring"></span>
<p>Split <code>string</code> into a list of components separated by
any of the characters in the sequence <code>separator</code>.
If <code>max</code> is specified, then no more than max(<code>1</code>,<code>max</code>) components will be returned,
starting the separation from the end, e.g. when called with arguments
&quot;a.b.c.d.e&quot; :max <code>3</code> :separator &quot;.&quot; it will return (&quot;a.b.c&quot; &quot;d&quot; &quot;e&quot;).
</p></dd></dl>
<span id="Function-uiop_002futility_003astandard_002dcase_002dsymbol_002dname"></span><dl class="def">
<dt id="index-standard_002dcase_002dsymbol_002dname"><span class="category">Function: </span><span><strong>standard-case-symbol-name</strong> <em>name-designator</em><a href='uiop.html#index-standard_002dcase_002dsymbol_002dname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003astandard_002dcase_002dsymbol_002dname"></span>
<p>Given a <code>name-designator</code> for a symbol, if it is a symbol, convert it to a string using <code>string</code>;
if it is a string, use <code>string-upcase</code> on an ANSI CL platform, or <code>string</code> on a so-called &quot;modern&quot;
platform such as Allegro with modern syntax.
</p></dd></dl>
<span id="Function-uiop_002futility_003astrcat"></span><dl class="def">
<dt id="index-strcat"><span class="category">Function: </span><span><strong>strcat</strong> <em>&amp;rest strings</em><a href='uiop.html#index-strcat' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003astrcat"></span>
<p>Concatenate strings.
<code>nil</code> is interpreted as an empty string, a character as a string of length one.
</p></dd></dl>
<span id="Function-uiop_002futility_003astring_002denclosed_002dp"></span><dl class="def">
<dt id="index-string_002denclosed_002dp"><span class="category">Function: </span><span><strong>string-enclosed-p</strong> <em>prefix string suffix</em><a href='uiop.html#index-string_002denclosed_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003astring_002denclosed_002dp"></span>
<p>Does <code>string</code> begin with <code>prefix</code> and end with <code>suffix</code>?
</p></dd></dl>
<span id="Function-uiop_002futility_003astring_002dprefix_002dp"></span><dl class="def">
<dt id="index-string_002dprefix_002dp"><span class="category">Function: </span><span><strong>string-prefix-p</strong> <em>prefix string</em><a href='uiop.html#index-string_002dprefix_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003astring_002dprefix_002dp"></span>
<p>Does <code>string</code> begin with <code>prefix</code>?
</p></dd></dl>
<span id="Function-uiop_002futility_003astring_002dsuffix_002dp"></span><dl class="def">
<dt id="index-string_002dsuffix_002dp"><span class="category">Function: </span><span><strong>string-suffix-p</strong> <em>string suffix</em><a href='uiop.html#index-string_002dsuffix_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003astring_002dsuffix_002dp"></span>
<p>Does <code>string</code> end with <code>suffix</code>?
</p></dd></dl>
<span id="Function-uiop_002futility_003astrings_002dcommon_002delement_002dtype"></span><dl class="def">
<dt id="index-strings_002dcommon_002delement_002dtype"><span class="category">Function: </span><span><strong>strings-common-element-type</strong> <em>strings</em><a href='uiop.html#index-strings_002dcommon_002delement_002dtype' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003astrings_002dcommon_002delement_002dtype"></span>
<p>What least subtype of <code>character</code> can contain all the elements of all the <code>strings</code>?
</p></dd></dl>
<span id="Function-uiop_002futility_003astripln"></span><dl class="def">
<dt id="index-stripln"><span class="category">Function: </span><span><strong>stripln</strong> <em>x</em><a href='uiop.html#index-stripln' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003astripln"></span>
<p>Strip a string <code>x</code> from any ending CR, LF or CRLF.
Return two values, the stripped string and the ending that was stripped,
or the original value and <code>nil</code> if no stripping took place.
Since our <code>strcat</code> accepts <code>nil</code> as empty string designator,
the two results passed to <code>strcat</code> always reconstitute the original string
</p></dd></dl>
<span id="Function-uiop_002futility_003asymbol_002dtest_002dto_002dfeature_002dexpression"></span><dl class="def">
<dt id="index-symbol_002dtest_002dto_002dfeature_002dexpression"><span class="category">Function: </span><span><strong>symbol-test-to-feature-expression</strong> <em>name package</em><a href='uiop.html#index-symbol_002dtest_002dto_002dfeature_002dexpression' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003asymbol_002dtest_002dto_002dfeature_002dexpression"></span>
<p>Check if a symbol with a given <code>name</code> exists in <code>package</code> and returns a
form suitable for testing with <code>#+</code>.
</p></dd></dl>
<span id="Macro-uiop_002futility_003aappendf"></span><dl class="def">
<dt id="index-appendf"><span class="category">Macro: </span><span><strong>appendf</strong> <em>place &amp;rest args</em><a href='uiop.html#index-appendf' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003aappendf"></span>
<p>Append onto list
</p></dd></dl>
<span id="Macro-uiop_002futility_003anest"></span><dl class="def">
<dt id="index-nest"><span class="category">Macro: </span><span><strong>nest</strong> <em>&amp;rest things</em><a href='uiop.html#index-nest' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003anest"></span>
<p>Macro to keep code nesting and indentation under control.
</p></dd></dl>
<span id="Macro-uiop_002futility_003auiop_002ddebug"></span><dl class="def">
<dt id="index-uiop_002ddebug"><span class="category">Macro: </span><span><strong>uiop-debug</strong> <em>&amp;rest keys</em><a href='uiop.html#index-uiop_002ddebug' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003auiop_002ddebug"></span>
<p>Load the <code>uiop</code> debug utility at compile-time as well as runtime
</p></dd></dl>
<span id="Macro-uiop_002futility_003awhile_002dcollecting"></span><dl class="def">
<dt id="index-while_002dcollecting"><span class="category">Macro: </span><span><strong>while-collecting</strong> <em>(&amp;rest collectors) &amp;body body</em><a href='uiop.html#index-while_002dcollecting' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003awhile_002dcollecting"></span>
<p><code>collectors</code> should be a list of names for collections. A collector
defines a function that, when applied to an argument inside <code>body</code>, will
add its argument to the corresponding collection. Returns multiple values,
a list for each collection, in order.
<code>e</code>.g.,
(while-collecting (foo bar)
(dolist (x &rsquo;((a <code>1</code>) (b <code>2</code>) (c <code>3</code>)))
(foo (first x))
(bar (second x))))
Returns two values: (A <code>b</code> <code>c</code>) and (<code>1</code> <code>2</code> <code>3</code>).
</p></dd></dl>
<span id="Macro-uiop_002futility_003awith_002dmuffled_002dconditions"></span><dl class="def">
<dt id="index-with_002dmuffled_002dconditions"><span class="category">Macro: </span><span><strong>with-muffled-conditions</strong> <em>(conditions) &amp;body body</em><a href='uiop.html#index-with_002dmuffled_002dconditions' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003awith_002dmuffled_002dconditions"></span>
<p>Shorthand syntax for <code>call-with-muffled-conditions</code>
</p></dd></dl>
<span id="Macro-uiop_002futility_003awith_002dupgradability"></span><dl class="def">
<dt id="index-with_002dupgradability"><span class="category">Macro: </span><span><strong>with-upgradability</strong> <em>(&amp;optional) &amp;body body</em><a href='uiop.html#index-with_002dupgradability' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003awith_002dupgradability"></span>
<p>Evaluate <code>body</code> at compile- load- and run- times, with <code>defun</code> and <code>defgeneric</code> modified
to also declare the functions <code>notinline</code> and to accept a wrapping the function name
specification into a list with keyword argument <code>supersede</code> (which defaults to <code>t</code> if the name
is not wrapped, and <code>nil</code> if it is wrapped). If <code>supersede</code> is true, call <code>undefine-function</code>
to supersede any previous definition.
</p></dd></dl>
<span id="Variable-uiop_002futility_003a_002auiop_002ddebug_002dutility_002a"></span><dl class="def">
<dt id="index-_002auiop_002ddebug_002dutility_002a"><span class="category">Variable: </span><span><strong>*uiop-debug-utility*</strong><a href='uiop.html#index-_002auiop_002ddebug_002dutility_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002futility_003a_002auiop_002ddebug_002dutility_002a"></span>
<p>form that evaluates to the pathname to your favorite debugging utilities
</p></dd></dl>
<hr>
</div>
<div class="chapter" id="UIOP_002fVERSION">
<div class="header">
<p>
Next: <a href="uiop.html#UIOP_002fOS" accesskey="n" rel="next">UIOP/OS</a>, Previous: <a href="uiop.html#UIOP_002fUTILITY" accesskey="p" rel="prev">UIOP/UTILITY</a>, Up: <a href="uiop.html#Top" accesskey="u" rel="up">UIOP</a> &nbsp; [<a href="uiop.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<span id="UIOP_002fVERSION-1"></span><h2 class="chapter">5 UIOP/VERSION</h2>
<span id="Function-uiop_002fversion_003anext_002dversion"></span><dl class="def">
<dt id="index-next_002dversion"><span class="category">Function: </span><span><strong>next-version</strong> <em>version</em><a href='uiop.html#index-next_002dversion' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fversion_003anext_002dversion"></span>
<p>When <code>version</code> is not nil, it is a string, then parse it as a version, compute the next version
and return it as a string.
</p></dd></dl>
<span id="Function-uiop_002fversion_003aparse_002dversion"></span><dl class="def">
<dt id="index-parse_002dversion"><span class="category">Function: </span><span><strong>parse-version</strong> <em>version-string &amp;optional on-error</em><a href='uiop.html#index-parse_002dversion' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fversion_003aparse_002dversion"></span>
<p>Parse a <code>version-string</code> as a series of natural numbers separated by dots.
Return a (non-null) list of integers if the string is valid;
otherwise return <code>nil</code>.
</p>
<p>When invalid, <code>on-error</code> is called as per <code>call-function</code> before to return <code>nil</code>,
with format arguments explaining why the version is invalid.
<code>on-error</code> is also called if the version is not canonical
in that it doesn&rsquo;t print back to itself, but the list is returned anyway.
</p></dd></dl>
<span id="Function-uiop_002fversion_003aunparse_002dversion"></span><dl class="def">
<dt id="index-unparse_002dversion"><span class="category">Function: </span><span><strong>unparse-version</strong> <em>version-list</em><a href='uiop.html#index-unparse_002dversion' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fversion_003aunparse_002dversion"></span>
<p>From a parsed version (a list of natural numbers), compute the version string
</p></dd></dl>
<span id="Function-uiop_002fversion_003aversion_002ddeprecation"></span><dl class="def">
<dt id="index-version_002ddeprecation"><span class="category">Function: </span><span><strong>version-deprecation</strong> <em>version &amp;key style-warning warning error delete</em><a href='uiop.html#index-version_002ddeprecation' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fversion_003aversion_002ddeprecation"></span>
<p>Given a <code>version</code> string, and the starting versions for notifying the programmer of
various levels of deprecation, return the current level of deprecation as per <code>with-deprecation</code>
that is the highest level that has a declared version older than the specified version.
Each start version for a level of deprecation can be specified by a keyword argument, or
if left unspecified, will be the <code>next-version</code> of the immediate lower level of deprecation.
</p></dd></dl>
<span id="Function-uiop_002fversion_003aversion_003d"></span><dl class="def">
<dt id="index-version_003d"><span class="category">Function: </span><span><strong>version=</strong> <em>version1 version2</em><a href='uiop.html#index-version_003d' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fversion_003aversion_003d"></span>
<p>Given two version strings, return <code>t</code> if the first is newer or the same and
the second is also newer or the same.
</p></dd></dl>
<span id="Function-uiop_002fversion_003aversion_003c_003d"></span><dl class="def">
<dt id="index-version_003c_003d"><span class="category">Function: </span><span><strong>version&lt;=</strong> <em>version1 version2</em><a href='uiop.html#index-version_003c_003d' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fversion_003aversion_003c_003d"></span>
<p>Given two version strings, return <code>t</code> if the second is newer or the same
</p></dd></dl>
<span id="Function-uiop_002fversion_003aversion_003c"></span><dl class="def">
<dt id="index-version_003c"><span class="category">Function: </span><span><strong>version&lt;</strong> <em>version1 version2</em><a href='uiop.html#index-version_003c' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fversion_003aversion_003c"></span>
<p>Given two version strings, return <code>t</code> if the second is strictly newer
</p></dd></dl>
<span id="Macro-uiop_002fversion_003awith_002ddeprecation"></span><dl class="def">
<dt id="index-with_002ddeprecation"><span class="category">Macro: </span><span><strong>with-deprecation</strong> <em>(level) &amp;body definitions</em><a href='uiop.html#index-with_002ddeprecation' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fversion_003awith_002ddeprecation"></span>
<p>Given a deprecation <code>level</code> (a form to be <code>eval</code>&rsquo;ed at macro-expansion time), instrument the
<code>defun</code> and <code>defmethod</code> forms in <code>definitions</code> to notify the programmer of the deprecation of the function
when it is compiled or called.
</p>
<p>Increasing levels (as result from evaluating <code>level</code>) are: <code>nil</code> (not deprecated yet),
<code>:style-warning</code> (a style warning is issued when used), <code>:warning</code> (a full warning is issued when used),
<code>:error</code> (a continuable error instead), and <code>:delete</code> (it&rsquo;s an error if the code is still there while
at that level).
</p>
<p>Forms other than <code>defun</code> and <code>defmethod</code> are not instrumented, and you can protect a <code>defun</code> or <code>defmethod</code>
from instrumentation by enclosing it in a <code>progn</code>.
</p></dd></dl>
<hr>
</div>
<div class="chapter" id="UIOP_002fOS">
<div class="header">
<p>
Next: <a href="uiop.html#UIOP_002fPATHNAME" accesskey="n" rel="next">UIOP/PATHNAME</a>, Previous: <a href="uiop.html#UIOP_002fVERSION" accesskey="p" rel="prev">UIOP/VERSION</a>, Up: <a href="uiop.html#Top" accesskey="u" rel="up">UIOP</a> &nbsp; [<a href="uiop.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<span id="UIOP_002fOS-1"></span><h2 class="chapter">6 UIOP/OS</h2>
<span id="Function-uiop_002fos_003aarchitecture"></span><dl class="def">
<dt id="index-architecture"><span class="category">Function: </span><span><strong>architecture</strong><a href='uiop.html#index-architecture' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003aarchitecture"></span>
<p>The CPU architecture of the current host
</p></dd></dl>
<span id="Function-uiop_002fos_003achdir"></span><dl class="def">
<dt id="index-chdir"><span class="category">Function: </span><span><strong>chdir</strong> <em>x</em><a href='uiop.html#index-chdir' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003achdir"></span>
<p>Change current directory, as per POSIX chdir(<code>2</code>), to a given pathname object
</p></dd></dl>
<span id="Function-uiop_002fos_003adetect_002dos"></span><dl class="def">
<dt id="index-detect_002dos"><span class="category">Function: </span><span><strong>detect-os</strong><a href='uiop.html#index-detect_002dos' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003adetect_002dos"></span>
<p>Detects the current operating system. Only needs be run at compile-time,
except on ABCL where it might change between FASL compilation and runtime.
</p></dd></dl>
<span id="Function-uiop_002fos_003afeaturep"></span><dl class="def">
<dt id="index-featurep"><span class="category">Function: </span><span><strong>featurep</strong> <em>x &amp;optional *features*</em><a href='uiop.html#index-featurep' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003afeaturep"></span>
<p>Checks whether a feature expression <code>x</code> is true with respect to the <code>*features*</code> set,
as per the CLHS standard for <code>#+</code> and <code>#-</code>. Beware that just like the CLHS,
we assume symbols from the <code>keyword</code> package are used, but that unless you&rsquo;re using #+/#-
your reader will not have magically used the <code>keyword</code> package, so you need specify
keywords explicitly.
</p></dd></dl>
<span id="Function-uiop_002fos_003agetcwd"></span><dl class="def">
<dt id="index-getcwd"><span class="category">Function: </span><span><strong>getcwd</strong><a href='uiop.html#index-getcwd' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003agetcwd"></span>
<p>Get the current working directory as per POSIX getcwd(<code>3</code>), as a pathname object
</p></dd></dl>
<span id="Function-uiop_002fos_003agetenv"></span><dl class="def">
<dt id="index-getenv"><span class="category">Function: </span><span><strong>getenv</strong> <em>x</em><a href='uiop.html#index-getenv' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003agetenv"></span>
<p>Query the environment, as in <code>c</code> getenv.
Beware: may return empty string if a variable is present but empty;
use getenvp to return <code>nil</code> in such a case.
</p></dd></dl>
<span id="Function-uiop_002fos_003agetenvp"></span><dl class="def">
<dt id="index-getenvp"><span class="category">Function: </span><span><strong>getenvp</strong> <em>x</em><a href='uiop.html#index-getenvp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003agetenvp"></span>
<p>Predicate that is true if the named variable is present in the libc environment,
then returning the non-empty string value of the variable
</p></dd></dl>
<span id="Function-uiop_002fos_003ahostname"></span><dl class="def">
<dt id="index-hostname"><span class="category">Function: </span><span><strong>hostname</strong><a href='uiop.html#index-hostname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003ahostname"></span>
<p>return the hostname of the current host
</p></dd></dl>
<span id="Function-uiop_002fos_003aimplementation_002didentifier"></span><dl class="def">
<dt id="index-implementation_002didentifier"><span class="category">Function: </span><span><strong>implementation-identifier</strong><a href='uiop.html#index-implementation_002didentifier' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003aimplementation_002didentifier"></span>
<p>Return a string that identifies the <code>abi</code> of the current implementation,
suitable for use as a directory name to segregate Lisp FASLs, <code>c</code> dynamic libraries, etc.
</p></dd></dl>
<span id="Function-uiop_002fos_003aimplementation_002dtype"></span><dl class="def">
<dt id="index-implementation_002dtype"><span class="category">Function: </span><span><strong>implementation-type</strong><a href='uiop.html#index-implementation_002dtype' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003aimplementation_002dtype"></span>
<p>The type of Lisp implementation used, as a short UIOP-standardized keyword
</p></dd></dl>
<span id="Function-uiop_002fos_003alisp_002dversion_002dstring"></span><dl class="def">
<dt id="index-lisp_002dversion_002dstring"><span class="category">Function: </span><span><strong>lisp-version-string</strong><a href='uiop.html#index-lisp_002dversion_002dstring' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003alisp_002dversion_002dstring"></span>
<p>return a string that identifies the current Lisp implementation version
</p></dd></dl>
<span id="Function-uiop_002fos_003aoperating_002dsystem"></span><dl class="def">
<dt id="index-operating_002dsystem"><span class="category">Function: </span><span><strong>operating-system</strong><a href='uiop.html#index-operating_002dsystem' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003aoperating_002dsystem"></span>
<p>The operating system of the current host
</p></dd></dl>
<span id="Function-uiop_002fos_003aos_002dgenera_002dp"></span><dl class="def">
<dt id="index-os_002dgenera_002dp"><span class="category">Function: </span><span><strong>os-genera-p</strong><a href='uiop.html#index-os_002dgenera_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003aos_002dgenera_002dp"></span>
<p>Is the underlying operating system Genera (running on a Symbolics Lisp Machine)?
</p></dd></dl>
<span id="Function-uiop_002fos_003aos_002dmacosx_002dp"></span><dl class="def">
<dt id="index-os_002dmacosx_002dp"><span class="category">Function: </span><span><strong>os-macosx-p</strong><a href='uiop.html#index-os_002dmacosx_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003aos_002dmacosx_002dp"></span>
<p>Is the underlying operating system MacOS <code>x</code>?
</p></dd></dl>
<span id="Function-uiop_002fos_003aos_002dunix_002dp"></span><dl class="def">
<dt id="index-os_002dunix_002dp"><span class="category">Function: </span><span><strong>os-unix-p</strong><a href='uiop.html#index-os_002dunix_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003aos_002dunix_002dp"></span>
<p>Is the underlying operating system some Unix variant?
</p></dd></dl>
<span id="Function-uiop_002fos_003aos_002dwindows_002dp"></span><dl class="def">
<dt id="index-os_002dwindows_002dp"><span class="category">Function: </span><span><strong>os-windows-p</strong><a href='uiop.html#index-os_002dwindows_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003aos_002dwindows_002dp"></span>
<p>Is the underlying operating system Microsoft Windows?
</p></dd></dl>
<span id="Function-uiop_002fos_003aparse_002dfile_002dlocation_002dinfo"></span><dl class="def">
<dt id="index-parse_002dfile_002dlocation_002dinfo"><span class="category">Function: </span><span><strong>parse-file-location-info</strong> <em>s</em><a href='uiop.html#index-parse_002dfile_002dlocation_002dinfo' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003aparse_002dfile_002dlocation_002dinfo"></span>
<p>helper to parse-windows-shortcut
</p></dd></dl>
<span id="Function-uiop_002fos_003aparse_002dwindows_002dshortcut"></span><dl class="def">
<dt id="index-parse_002dwindows_002dshortcut"><span class="category">Function: </span><span><strong>parse-windows-shortcut</strong> <em>pathname</em><a href='uiop.html#index-parse_002dwindows_002dshortcut' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003aparse_002dwindows_002dshortcut"></span>
<p>From a .lnk windows shortcut, extract the pathname linked to
</p></dd></dl>
<span id="Function-uiop_002fos_003aread_002dlittle_002dendian"></span><dl class="def">
<dt id="index-read_002dlittle_002dendian"><span class="category">Function: </span><span><strong>read-little-endian</strong> <em>s &amp;optional bytes</em><a href='uiop.html#index-read_002dlittle_002dendian' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003aread_002dlittle_002dendian"></span>
<p>Read a number in little-endian format from an byte (octet) stream <code>s</code>,
the number having <code>bytes</code> octets (defaulting to <code>4</code>).
</p></dd></dl>
<span id="Function-uiop_002fos_003aread_002dnull_002dterminated_002dstring"></span><dl class="def">
<dt id="index-read_002dnull_002dterminated_002dstring"><span class="category">Function: </span><span><strong>read-null-terminated-string</strong> <em>s</em><a href='uiop.html#index-read_002dnull_002dterminated_002dstring' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003aread_002dnull_002dterminated_002dstring"></span>
<p>Read a null-terminated string from an octet stream <code>s</code>
</p></dd></dl>
<span id="Setf_002dExpander-uiop_002fos_003agetenv"></span><dl class="def">
<dt id="index-getenv-1"><span class="category">Setf Expander: </span><span><strong>getenv</strong> <em>x</em><a href='uiop.html#index-getenv-1' class='copiable-anchor'> &para;</a></span></dt>
<dd><p>Set an environment variable.
</p></dd></dl>
<span id="Variable-uiop_002fos_003a_002aimplementation_002dtype_002a"></span><dl class="def">
<dt id="index-_002aimplementation_002dtype_002a"><span class="category">Variable: </span><span><strong>*implementation-type*</strong><a href='uiop.html#index-_002aimplementation_002dtype_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fos_003a_002aimplementation_002dtype_002a"></span>
<p>The type of Lisp implementation used, as a short UIOP-standardized keyword
</p></dd></dl>
<hr>
</div>
<div class="chapter" id="UIOP_002fPATHNAME">
<div class="header">
<p>
Next: <a href="uiop.html#UIOP_002fFILESYSTEM" accesskey="n" rel="next">UIOP/FILESYSTEM</a>, Previous: <a href="uiop.html#UIOP_002fOS" accesskey="p" rel="prev">UIOP/OS</a>, Up: <a href="uiop.html#Top" accesskey="u" rel="up">UIOP</a> &nbsp; [<a href="uiop.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<span id="UIOP_002fPATHNAME-1"></span><h2 class="chapter">7 UIOP/PATHNAME</h2>
<span id="Function-uiop_002fpathname_003aabsolute_002dpathname_002dp"></span><dl class="def">
<dt id="index-absolute_002dpathname_002dp"><span class="category">Function: </span><span><strong>absolute-pathname-p</strong> <em>pathspec</em><a href='uiop.html#index-absolute_002dpathname_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003aabsolute_002dpathname_002dp"></span>
<p>If <code>pathspec</code> is a pathname or namestring object that parses as a pathname
possessing an <code>:absolute</code> directory component, return the (parsed) pathname.
Otherwise return <code>nil</code>
</p></dd></dl>
<span id="Function-uiop_002fpathname_003acall_002dwith_002denough_002dpathname"></span><dl class="def">
<dt id="index-call_002dwith_002denough_002dpathname"><span class="category">Function: </span><span><strong>call-with-enough-pathname</strong> <em>maybe-subpath defaults-pathname thunk</em><a href='uiop.html#index-call_002dwith_002denough_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003acall_002dwith_002denough_002dpathname"></span>
<p>In a context where <code>*default-pathname-defaults*</code> is bound to <code>defaults-pathname</code> (if not null,
or else to its current value), call <code>thunk</code> with <code>enough-pathname</code> for <code>maybe-subpath</code>
given <code>defaults-pathname</code> as a base pathname.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003adenormalize_002dpathname_002ddirectory_002dcomponent"></span><dl class="def">
<dt id="index-denormalize_002dpathname_002ddirectory_002dcomponent"><span class="category">Function: </span><span><strong>denormalize-pathname-directory-component</strong> <em>directory-component</em><a href='uiop.html#index-denormalize_002dpathname_002ddirectory_002dcomponent' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003adenormalize_002dpathname_002ddirectory_002dcomponent"></span>
<p>Convert the <code>directory-component</code> from a CLHS-standard format to a format usable
by the underlying implementation&rsquo;s <code>make-pathname</code> and other primitives
</p></dd></dl>
<span id="Function-uiop_002fpathname_003adirectorize_002dpathname_002dhost_002ddevice"></span><dl class="def">
<dt id="index-directorize_002dpathname_002dhost_002ddevice"><span class="category">Function: </span><span><strong>directorize-pathname-host-device</strong> <em>pathname</em><a href='uiop.html#index-directorize_002dpathname_002dhost_002ddevice' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003adirectorize_002dpathname_002dhost_002ddevice"></span>
<p>Given a <code>pathname</code>, return a pathname that has representations of its <code>host</code> and <code>device</code> components
added to its <code>directory</code> component. This is useful for output translations.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003adirectory_002dpathname_002dp"></span><dl class="def">
<dt id="index-directory_002dpathname_002dp"><span class="category">Function: </span><span><strong>directory-pathname-p</strong> <em>pathname</em><a href='uiop.html#index-directory_002dpathname_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003adirectory_002dpathname_002dp"></span>
<p>Does <code>pathname</code> represent a directory?
</p>
<p>A directory-pathname is a pathname _without_ a filename. The three
ways that the filename components can be missing are for it to be <code>nil</code>,
<code>:unspecific</code> or the empty string.
</p>
<p>Note that this does _not_ check to see that <code>pathname</code> points to an
actually-existing directory.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003adirectory_002dseparator_002dfor_002dhost"></span><dl class="def">
<dt id="index-directory_002dseparator_002dfor_002dhost"><span class="category">Function: </span><span><strong>directory-separator-for-host</strong> <em>&amp;optional pathname</em><a href='uiop.html#index-directory_002dseparator_002dfor_002dhost' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003adirectory_002dseparator_002dfor_002dhost"></span>
<p>Given a <code>pathname</code>, return the character used to delimit directory names on this host and device.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003aenough_002dpathname"></span><dl class="def">
<dt id="index-enough_002dpathname"><span class="category">Function: </span><span><strong>enough-pathname</strong> <em>maybe-subpath base-pathname</em><a href='uiop.html#index-enough_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003aenough_002dpathname"></span>
<p>if <code>maybe-subpath</code> is a pathname that is under <code>base-pathname</code>, return a pathname object that
when used with <code>merge-pathnames*</code> with defaults <code>base-pathname</code>, returns <code>maybe-subpath</code>.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003aensure_002dabsolute_002dpathname"></span><dl class="def">
<dt id="index-ensure_002dabsolute_002dpathname"><span class="category">Function: </span><span><strong>ensure-absolute-pathname</strong> <em>path &amp;optional defaults on-error</em><a href='uiop.html#index-ensure_002dabsolute_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003aensure_002dabsolute_002dpathname"></span>
<p>Given a pathname designator <code>path</code>, return an absolute pathname as specified by <code>path</code>
considering the <code>defaults</code>, or, if not possible, use <code>call-function</code> on the specified <code>on-error</code> behavior,
with a format control-string and other arguments as arguments
</p></dd></dl>
<span id="Function-uiop_002fpathname_003aensure_002ddirectory_002dpathname"></span><dl class="def">
<dt id="index-ensure_002ddirectory_002dpathname"><span class="category">Function: </span><span><strong>ensure-directory-pathname</strong> <em>pathspec &amp;optional on-error</em><a href='uiop.html#index-ensure_002ddirectory_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003aensure_002ddirectory_002dpathname"></span>
<p>Converts the non-wild pathname designator <code>pathspec</code> to directory form.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003aensure_002dpathname"></span><dl class="def">
<dt id="index-ensure_002dpathname"><span class="category">Function: </span><span><strong>ensure-pathname</strong> <em>pathname &amp;key on-error defaults type dot-dot namestring empty-is-nil want-pathname want-logical want-physical ensure-physical want-relative want-absolute ensure-absolute ensure-subpath want-non-wild want-wild wilden want-file want-directory ensure-directory want-existing ensure-directories-exist truename resolve-symlinks truenamize &amp;aux p</em><a href='uiop.html#index-ensure_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003aensure_002dpathname"></span>
<p>Coerces its argument into a <code>pathname</code>,
optionally doing some transformations and checking specified constraints.
</p>
<p>If the argument is <code>nil</code>, then <code>nil</code> is returned unless the <code>want-pathname</code> constraint is specified.
</p>
<p>If the argument is a <code>string</code>, it is first converted to a pathname via
<code>parse-unix-namestring</code>, <code>parse-namestring</code> or <code>parse-native-namestring</code> respectively
depending on the <code>namestring</code> argument being <code>:unix</code>, <code>:lisp</code> or <code>:native</code> respectively,
or else by using <code>call-function</code> on the <code>namestring</code> argument;
if <code>:unix</code> is specified (or <code>nil</code>, the default, which specifies the same thing),
then <code>parse-unix-namestring</code> it is called with the keywords
<code>defaults</code> <code>type</code> <code>dot-dot</code> <code>ensure-directory</code> <code>want-relative</code>, and
the result is optionally merged into the <code>defaults</code> if <code>ensure-absolute</code> is true.
</p>
<p>The pathname passed or resulting from parsing the string
is then subjected to all the checks and transformations below are run.
</p>
<p>Each non-nil constraint argument can be one of the symbols <code>t</code>, <code>error</code>, <code>cerror</code> or <code>ignore</code>.
The boolean <code>t</code> is an alias for <code>error</code>.
<code>error</code> means that an error will be raised if the constraint is not satisfied.
<code>cerror</code> means that an continuable error will be raised if the constraint is not satisfied.
<code>ignore</code> means just return <code>nil</code> instead of the pathname.
</p>
<p>The <code>on-error</code> argument, if not <code>nil</code>, is a function designator (as per <code>call-function</code>)
that will be called with the the following arguments:
a generic format string for ensure pathname, the pathname,
the keyword argument corresponding to the failed check or transformation,
a format string for the reason <code>ensure-pathname</code> failed,
and a list with arguments to that format string.
If <code>on-error</code> is <code>nil</code>, <code>error</code> is used instead, which does the right thing.
You could also pass (<code>cerror</code> &quot;<code>continue</code> <code>despite</code> <code>failed</code> <code>check</code>&quot;).
</p>
<p>The transformations and constraint checks are done in this order,
which is also the order in the lambda-list:
</p>
<p><code>empty-is-nil</code> returns <code>nil</code> if the argument is an empty string.
<code>want-pathname</code> checks that pathname (after parsing if needed) is not null.
Otherwise, if the pathname is <code>nil</code>, ensure-pathname returns <code>nil</code>.
<code>want-logical</code> checks that pathname is a <code>logical-pathname</code>
<code>want-physical</code> checks that pathname is not a <code>logical-pathname</code>
<code>ensure-physical</code> ensures that pathname is physical via <code>translate-logical-pathname</code>
<code>want-relative</code> checks that pathname has a relative directory component
<code>want-absolute</code> checks that pathname does have an absolute directory component
<code>ensure-absolute</code> merges with the <code>defaults</code>, then checks again
that the result absolute is an absolute pathname indeed.
<code>ensure-subpath</code> checks that the pathname is a subpath of the <code>defaults</code>.
<code>want-file</code> checks that pathname has a non-nil <code>file</code> component
<code>want-directory</code> checks that pathname has nil <code>file</code> and <code>type</code> components
<code>ensure-directory</code> uses <code>ensure-directory-pathname</code> to interpret
any file and type components as being actually a last directory component.
<code>want-non-wild</code> checks that pathname is not a wild pathname
<code>want-wild</code> checks that pathname is a wild pathname
<code>wilden</code> merges the pathname with **/*.<code>*</code>.<code>*</code> if it is not wild
<code>want-existing</code> checks that a file (or directory) exists with that pathname.
<code>ensure-directories-exist</code> creates any parent directory with <code>ensure-directories-exist</code>.
<code>truename</code> replaces the pathname by its truename, or errors if not possible.
<code>resolve-symlinks</code> replaces the pathname by a variant with symlinks resolved by <code>resolve-symlinks</code>.
<code>truenamize</code> uses <code>truenamize</code> to resolve as many symlinks as possible.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003afile_002dpathname_002dp"></span><dl class="def">
<dt id="index-file_002dpathname_002dp"><span class="category">Function: </span><span><strong>file-pathname-p</strong> <em>pathname</em><a href='uiop.html#index-file_002dpathname_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003afile_002dpathname_002dp"></span>
<p>Does <code>pathname</code> represent a file, i.e. has a non-null <code>name</code> component?
</p>
<p>Accepts <code>nil</code>, a string (converted through <code>parse-namestring</code>) or a <code>pathname</code>.
</p>
<p>Note that this does _not_ check to see that <code>pathname</code> points to an
actually-existing file.
</p>
<p>Returns the (parsed) <code>pathname</code> when true
</p></dd></dl>
<span id="Function-uiop_002fpathname_003ahidden_002dpathname_002dp"></span><dl class="def">
<dt id="index-hidden_002dpathname_002dp"><span class="category">Function: </span><span><strong>hidden-pathname-p</strong> <em>pathname</em><a href='uiop.html#index-hidden_002dpathname_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003ahidden_002dpathname_002dp"></span>
<p>Return a boolean that is true if the pathname is hidden as per Unix style,
i.e. its name starts with a dot.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003alogical_002dpathname_002dp"></span><dl class="def">
<dt id="index-logical_002dpathname_002dp"><span class="category">Function: </span><span><strong>logical-pathname-p</strong> <em>x</em><a href='uiop.html#index-logical_002dpathname_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003alogical_002dpathname_002dp"></span>
<p>is <code>x</code> a logical-pathname?
</p></dd></dl>
<span id="Function-uiop_002fpathname_003amake_002dpathname_002dcomponent_002dlogical"></span><dl class="def">
<dt id="index-make_002dpathname_002dcomponent_002dlogical"><span class="category">Function: </span><span><strong>make-pathname-component-logical</strong> <em>x</em><a href='uiop.html#index-make_002dpathname_002dcomponent_002dlogical' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003amake_002dpathname_002dcomponent_002dlogical"></span>
<p>Make a pathname component suitable for use in a logical-pathname
</p></dd></dl>
<span id="Function-uiop_002fpathname_003amake_002dpathname_002dlogical"></span><dl class="def">
<dt id="index-make_002dpathname_002dlogical"><span class="category">Function: </span><span><strong>make-pathname-logical</strong> <em>pathname host</em><a href='uiop.html#index-make_002dpathname_002dlogical' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003amake_002dpathname_002dlogical"></span>
<p>Take a <code>pathname</code>&rsquo;s directory, name, type and version components,
and make a new pathname with corresponding components and specified logical <code>host</code>
</p></dd></dl>
<span id="Function-uiop_002fpathname_003amake_002dpathname_002a"></span><dl class="def">
<dt id="index-make_002dpathname_002a"><span class="category">Function: </span><span><strong>make-pathname*</strong> <em>&amp;rest keys &amp;key directory host device name type version defaults</em><a href='uiop.html#index-make_002dpathname_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003amake_002dpathname_002a"></span>
<p>Takes arguments like <code>cl:make-pathname</code> in the CLHS, and
tries hard to make a pathname that will actually behave as documented,
despite the peculiarities of each implementation. <code>deprecated:</code> just use <code>make-pathname</code>.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003amerge_002dpathname_002ddirectory_002dcomponents"></span><dl class="def">
<dt id="index-merge_002dpathname_002ddirectory_002dcomponents"><span class="category">Function: </span><span><strong>merge-pathname-directory-components</strong> <em>specified defaults</em><a href='uiop.html#index-merge_002dpathname_002ddirectory_002dcomponents' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003amerge_002dpathname_002ddirectory_002dcomponents"></span>
<p>Helper for <code>merge-pathnames*</code> that handles directory components
</p></dd></dl>
<span id="Function-uiop_002fpathname_003amerge_002dpathnames_002a"></span><dl class="def">
<dt id="index-merge_002dpathnames_002a"><span class="category">Function: </span><span><strong>merge-pathnames*</strong> <em>specified &amp;optional defaults</em><a href='uiop.html#index-merge_002dpathnames_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003amerge_002dpathnames_002a"></span>
<p><code>merge-pathnames*</code> is like <code>merge-pathnames</code> except that
if the <code>specified</code> pathname does not have an absolute directory,
then the <code>host</code> and <code>device</code> both come from the <code>defaults</code>, whereas
if the <code>specified</code> pathname does have an absolute directory,
then the <code>host</code> and <code>device</code> both come from the <code>specified</code> pathname.
This is what users want on a modern Unix or Windows operating system,
unlike the <code>merge-pathnames</code> behavior.
Also, if either argument is <code>nil</code>, then the other argument is returned unmodified;
this is unlike <code>merge-pathnames</code> which always merges with a pathname,
by default <code>*default-pathname-defaults*</code>, which cannot be <code>nil</code>.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003anil_002dpathname"></span><dl class="def">
<dt id="index-nil_002dpathname"><span class="category">Function: </span><span><strong>nil-pathname</strong> <em>&amp;optional defaults</em><a href='uiop.html#index-nil_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003anil_002dpathname"></span>
<p>A pathname that is as neutral as possible for use as defaults
when merging, making or parsing pathnames
</p></dd></dl>
<span id="Function-uiop_002fpathname_003anormalize_002dpathname_002ddirectory_002dcomponent"></span><dl class="def">
<dt id="index-normalize_002dpathname_002ddirectory_002dcomponent"><span class="category">Function: </span><span><strong>normalize-pathname-directory-component</strong> <em>directory</em><a href='uiop.html#index-normalize_002dpathname_002ddirectory_002dcomponent' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003anormalize_002dpathname_002ddirectory_002dcomponent"></span>
<p>Convert the <code>directory</code> component from a format usable by the underlying
implementation&rsquo;s <code>make-pathname</code> and other primitives to a CLHS-standard format
that is a list and not a string.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003aparse_002dunix_002dnamestring"></span><dl class="def">
<dt id="index-parse_002dunix_002dnamestring"><span class="category">Function: </span><span><strong>parse-unix-namestring</strong> <em>name &amp;rest keys &amp;key type defaults dot-dot ensure-directory &amp;allow-other-keys </em><a href='uiop.html#index-parse_002dunix_002dnamestring' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003aparse_002dunix_002dnamestring"></span>
<p>Coerce <code>name</code> into a <code>pathname</code> using standard Unix syntax.
</p>
<p>Unix syntax is used whether or not the underlying system is Unix;
on such non-Unix systems it is reliably usable only for relative pathnames.
This function is especially useful to manipulate relative pathnames portably,
where it is crucial to possess a portable pathname syntax independent of the underlying OS.
This is what <code>parse-unix-namestring</code> provides, and why we use it in ASDF.
</p>
<p>When given a <code>pathname</code> object, just return it untouched.
When given <code>nil</code>, just return <code>nil</code>.
When given a non-null <code>symbol</code>, first downcase its name and treat it as a string.
When given a <code>string</code>, portably decompose it into a pathname as below.
</p>
<p>#\/ separates directory components.
</p>
<p>The last #\/-separated substring is interpreted as follows:
<code>1-</code> If <code>type</code> is <code>:directory</code> or <code>ensure-directory</code> is true,
the string is made the last directory component, and <code>name</code> and <code>type</code> are <code>nil</code>.
if the string is empty, it&rsquo;s the empty pathname with all slots <code>nil</code>.
<code>2-</code> If <code>type</code> is <code>nil</code>, the substring is a file-namestring, and its <code>name</code> and <code>type</code>
are separated by <code>split-name-type</code>.
<code>3-</code> If <code>type</code> is a string, it is the given <code>type</code>, and the whole string is the <code>name</code>.
</p>
<p>Directory components with an empty name or the name &quot;.&quot; are removed.
Any directory named &quot;..&quot; is read as <code>dot-dot</code>,
which must be one of <code>:back</code> or <code>:up</code> and defaults to <code>:back</code>.
</p>
<p><code>host</code>, <code>device</code> and <code>version</code> components are taken from <code>defaults</code>,
which itself defaults to <code>*nil-pathname*</code>, also used if <code>defaults</code> is <code>nil</code>.
No host or device can be specified in the string itself,
which makes it unsuitable for absolute pathnames outside Unix.
</p>
<p>For relative pathnames, these components (and hence the defaults) won&rsquo;t matter
if you use <code>merge-pathnames*</code> but will matter if you use <code>merge-pathnames</code>,
which is an important reason to always use <code>merge-pathnames*</code>.
</p>
<p>Arbitrary keys are accepted, and the parse result is passed to <code>ensure-pathname</code>
with those keys, removing <code>type</code> <code>defaults</code> and <code>dot-dot</code>.
When you&rsquo;re manipulating pathnames that are supposed to make sense portably
even though the OS may not be Unixish, we recommend you use <code>:want-relative</code> <code>t</code>
to throw an error if the pathname is absolute
</p></dd></dl>
<span id="Function-uiop_002fpathname_003apathname_002ddirectory_002dpathname"></span><dl class="def">
<dt id="index-pathname_002ddirectory_002dpathname"><span class="category">Function: </span><span><strong>pathname-directory-pathname</strong> <em>pathname</em><a href='uiop.html#index-pathname_002ddirectory_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003apathname_002ddirectory_002dpathname"></span>
<p>Returns a new pathname with same <code>host</code>, <code>device</code>, <code>directory</code> as <code>pathname</code>,
and <code>nil</code> <code>name</code>, <code>type</code> and <code>version</code> components
</p></dd></dl>
<span id="Function-uiop_002fpathname_003apathname_002dequal"></span><dl class="def">
<dt id="index-pathname_002dequal"><span class="category">Function: </span><span><strong>pathname-equal</strong> <em>p1 p2</em><a href='uiop.html#index-pathname_002dequal' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003apathname_002dequal"></span>
<p>Are the two pathnames <code>p1</code> and <code>p2</code> reasonably equal in the paths they denote?
</p></dd></dl>
<span id="Function-uiop_002fpathname_003apathname_002dhost_002dpathname"></span><dl class="def">
<dt id="index-pathname_002dhost_002dpathname"><span class="category">Function: </span><span><strong>pathname-host-pathname</strong> <em>pathname</em><a href='uiop.html#index-pathname_002dhost_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003apathname_002dhost_002dpathname"></span>
<p>return a pathname with the same host as given <code>pathname</code>, and all other fields <code>nil</code>
</p></dd></dl>
<span id="Function-uiop_002fpathname_003apathname_002dparent_002ddirectory_002dpathname"></span><dl class="def">
<dt id="index-pathname_002dparent_002ddirectory_002dpathname"><span class="category">Function: </span><span><strong>pathname-parent-directory-pathname</strong> <em>pathname</em><a href='uiop.html#index-pathname_002dparent_002ddirectory_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003apathname_002dparent_002ddirectory_002dpathname"></span>
<p>Returns a new pathname that corresponds to the parent of the current pathname&rsquo;s directory,
i.e. removing one level of depth in the <code>directory</code> component. e.g. if pathname is
Unix pathname /foo/bar/baz/file.type then return /foo/bar/
</p></dd></dl>
<span id="Function-uiop_002fpathname_003apathname_002droot"></span><dl class="def">
<dt id="index-pathname_002droot"><span class="category">Function: </span><span><strong>pathname-root</strong> <em>pathname</em><a href='uiop.html#index-pathname_002droot' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003apathname_002droot"></span>
<p>return the root directory for the host and device of given <code>pathname</code>
</p></dd></dl>
<span id="Function-uiop_002fpathname_003aphysical_002dpathname_002dp"></span><dl class="def">
<dt id="index-physical_002dpathname_002dp"><span class="category">Function: </span><span><strong>physical-pathname-p</strong> <em>x</em><a href='uiop.html#index-physical_002dpathname_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003aphysical_002dpathname_002dp"></span>
<p>is <code>x</code> a pathname that is not a logical-pathname?
</p></dd></dl>
<span id="Function-uiop_002fpathname_003aphysicalize_002dpathname"></span><dl class="def">
<dt id="index-physicalize_002dpathname"><span class="category">Function: </span><span><strong>physicalize-pathname</strong> <em>x</em><a href='uiop.html#index-physicalize_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003aphysicalize_002dpathname"></span>
<p>if <code>x</code> is a logical pathname, use translate-logical-pathname on it.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003arelative_002dpathname_002dp"></span><dl class="def">
<dt id="index-relative_002dpathname_002dp"><span class="category">Function: </span><span><strong>relative-pathname-p</strong> <em>pathspec</em><a href='uiop.html#index-relative_002dpathname_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003arelative_002dpathname_002dp"></span>
<p>If <code>pathspec</code> is a pathname or namestring object that parses as a pathname
possessing a <code>:relative</code> or <code>nil</code> directory component, return the (parsed) pathname.
Otherwise return <code>nil</code>
</p></dd></dl>
<span id="Function-uiop_002fpathname_003arelativize_002ddirectory_002dcomponent"></span><dl class="def">
<dt id="index-relativize_002ddirectory_002dcomponent"><span class="category">Function: </span><span><strong>relativize-directory-component</strong> <em>directory-component</em><a href='uiop.html#index-relativize_002ddirectory_002dcomponent' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003arelativize_002ddirectory_002dcomponent"></span>
<p>Given the <code>directory-component</code> of a pathname, return an otherwise similar relative directory component
</p></dd></dl>
<span id="Function-uiop_002fpathname_003arelativize_002dpathname_002ddirectory"></span><dl class="def">
<dt id="index-relativize_002dpathname_002ddirectory"><span class="category">Function: </span><span><strong>relativize-pathname-directory</strong> <em>pathspec</em><a href='uiop.html#index-relativize_002dpathname_002ddirectory' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003arelativize_002dpathname_002ddirectory"></span>
<p>Given a <code>pathname</code>, return a relative pathname with otherwise the same components
</p></dd></dl>
<span id="Function-uiop_002fpathname_003asplit_002dname_002dtype"></span><dl class="def">
<dt id="index-split_002dname_002dtype"><span class="category">Function: </span><span><strong>split-name-type</strong> <em>filename</em><a href='uiop.html#index-split_002dname_002dtype' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003asplit_002dname_002dtype"></span>
<p>Split a filename into two values <code>name</code> and <code>type</code> that are returned.
We assume filename has no directory component.
The last . if any separates name and type from from type,
except that if there is only one . and it is in first position,
the whole filename is the <code>name</code> with an empty type.
<code>name</code> is always a string.
For an empty type, <code>*unspecific-pathname-type*</code> is returned.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003asplit_002dunix_002dnamestring_002ddirectory_002dcomponents"></span><dl class="def">
<dt id="index-split_002dunix_002dnamestring_002ddirectory_002dcomponents"><span class="category">Function: </span><span><strong>split-unix-namestring-directory-components</strong> <em>unix-namestring &amp;key ensure-directory dot-dot</em><a href='uiop.html#index-split_002dunix_002dnamestring_002ddirectory_002dcomponents' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003asplit_002dunix_002dnamestring_002ddirectory_002dcomponents"></span>
<p>Splits the path string <code>unix-namestring</code>, returning four values:
A flag that is either :absolute or :relative, indicating
how the rest of the values are to be interpreted.
A directory path <code>---</code> a list of strings and keywords, suitable for
use with <code>make-pathname</code> when prepended with the flag value.
Directory components with an empty name or the name . are removed.
Any directory named .. is read as <code>dot-dot</code>, or <code>:back</code> if it&rsquo;s <code>nil</code> (not <code>:up</code>).
A last-component, either a file-namestring including type extension,
or <code>nil</code> in the case of a directory pathname.
A flag that is true iff the unix-style-pathname was just
a file-namestring without / path specification.
<code>ensure-directory</code> forces the namestring to be interpreted as a directory pathname:
the third return value will be <code>nil</code>, and final component of the namestring
will be treated as part of the directory path.
</p>
<p>An empty string is thus read as meaning a pathname object with all fields nil.
</p>
<p>Note that colon characters <code>#:</code> will <code>not</code> be interpreted as host specification.
Absolute pathnames are only appropriate on Unix-style systems.
</p>
<p>The intention of this function is to support structured component names,
e.g., (:file &quot;foo/bar&quot;), which will be unpacked to relative pathnames.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003asubpathname_002a"></span><dl class="def">
<dt id="index-subpathname_002a"><span class="category">Function: </span><span><strong>subpathname*</strong> <em>pathname subpath &amp;key type</em><a href='uiop.html#index-subpathname_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003asubpathname_002a"></span>
<p>returns <code>nil</code> if the base pathname is <code>nil</code>, otherwise like <code>subpathname</code>.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003asubpathname"></span><dl class="def">
<dt id="index-subpathname"><span class="category">Function: </span><span><strong>subpathname</strong> <em>pathname subpath &amp;key type</em><a href='uiop.html#index-subpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003asubpathname"></span>
<p>This function takes a <code>pathname</code> and a <code>subpath</code> and a <code>type</code>.
If <code>subpath</code> is already a <code>pathname</code> object (not namestring),
and is an absolute pathname at that, it is returned unchanged;
otherwise, <code>subpath</code> is turned into a relative pathname with given <code>type</code>
as per <code>parse-unix-namestring</code> with <code>:want-relative</code> <code>t</code> <code>:type</code> <code>type</code>,
then it is merged with the <code>pathname-directory-pathname</code> of <code>pathname</code>.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003asubpathp"></span><dl class="def">
<dt id="index-subpathp"><span class="category">Function: </span><span><strong>subpathp</strong> <em>maybe-subpath base-pathname</em><a href='uiop.html#index-subpathp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003asubpathp"></span>
<p>if <code>maybe-subpath</code> is a pathname that is under <code>base-pathname</code>, return a pathname object that
when used with <code>merge-pathnames*</code> with defaults <code>base-pathname</code>, returns <code>maybe-subpath</code>.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003atranslate_002dpathname_002a"></span><dl class="def">
<dt id="index-translate_002dpathname_002a"><span class="category">Function: </span><span><strong>translate-pathname*</strong> <em>path absolute-source destination &amp;optional root source</em><a href='uiop.html#index-translate_002dpathname_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003atranslate_002dpathname_002a"></span>
<p>A wrapper around <code>translate-pathname</code> to be used by the ASDF output-translations facility.
<code>path</code> is the pathname to be translated.
<code>absolute-source</code> is an absolute pathname to use as source for translate-pathname,
<code>destination</code> is either a function, to be called with <code>path</code> and <code>absolute-source</code>,
or a relative pathname, to be merged with <code>root</code> and used as destination for translate-pathname
or an absolute pathname, to be used as destination for translate-pathname.
In that last case, if <code>root</code> is non-NIL, <code>path</code> is first transformated by <code>directorize-pathname-host-device</code>.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003aunix_002dnamestring"></span><dl class="def">
<dt id="index-unix_002dnamestring"><span class="category">Function: </span><span><strong>unix-namestring</strong> <em>pathname</em><a href='uiop.html#index-unix_002dnamestring' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003aunix_002dnamestring"></span>
<p>Given a non-wild <code>pathname</code>, return a Unix-style namestring for it.
If the <code>pathname</code> is <code>nil</code> or a <code>string</code>, return it unchanged.
</p>
<p>This only considers the <code>directory</code>, <code>name</code> and <code>type</code> components of the pathname.
This is a portable solution for representing relative pathnames,
But unless you are running on a Unix system, it is not a general solution
to representing native pathnames.
</p>
<p>An error is signaled if the argument is not <code>null</code>, a <code>string</code> or a <code>pathname</code>,
or if it is a <code>pathname</code> but some of its components are not recognized.
</p></dd></dl>
<span id="Function-uiop_002fpathname_003awilden"></span><dl class="def">
<dt id="index-wilden"><span class="category">Function: </span><span><strong>wilden</strong> <em>path</em><a href='uiop.html#index-wilden' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003awilden"></span>
<p>From a pathname, return a wildcard pathname matching any file in any subdirectory of given pathname&rsquo;s directory
</p></dd></dl>
<span id="Macro-uiop_002fpathname_003awith_002denough_002dpathname"></span><dl class="def">
<dt id="index-with_002denough_002dpathname"><span class="category">Macro: </span><span><strong>with-enough-pathname</strong> <em>(pathname-var &amp;key pathname defaults) &amp;body body</em><a href='uiop.html#index-with_002denough_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003awith_002denough_002dpathname"></span>
<p>Shorthand syntax for <code>call-with-enough-pathname</code>
</p></dd></dl>
<span id="Macro-uiop_002fpathname_003awith_002dpathname_002ddefaults"></span><dl class="def">
<dt id="index-with_002dpathname_002ddefaults"><span class="category">Macro: </span><span><strong>with-pathname-defaults</strong> <em>(&amp;optional defaults) &amp;body body</em><a href='uiop.html#index-with_002dpathname_002ddefaults' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003awith_002dpathname_002ddefaults"></span>
<p>Execute <code>body</code> in a context where the <code>*default-pathname-defaults*</code> is as specified,
where leaving the defaults <code>nil</code> or unspecified means a (<code>nil-pathname</code>), except
on ABCL, Genera and XCL, where it remains unchanged for it doubles as current-directory.
</p></dd></dl>
<span id="Variable-uiop_002fpathname_003a_002anil_002dpathname_002a"></span><dl class="def">
<dt id="index-_002anil_002dpathname_002a"><span class="category">Variable: </span><span><strong>*nil-pathname*</strong><a href='uiop.html#index-_002anil_002dpathname_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003a_002anil_002dpathname_002a"></span>
<p>A pathname that is as neutral as possible for use as defaults
when merging, making or parsing pathnames
</p></dd></dl>
<span id="Variable-uiop_002fpathname_003a_002aoutput_002dtranslation_002dfunction_002a"></span><dl class="def">
<dt id="index-_002aoutput_002dtranslation_002dfunction_002a"><span class="category">Variable: </span><span><strong>*output-translation-function*</strong><a href='uiop.html#index-_002aoutput_002dtranslation_002dfunction_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003a_002aoutput_002dtranslation_002dfunction_002a"></span>
<p>Hook for output translations.
</p>
<p>This function needs to be idempotent, so that actions can work
whether their inputs were translated or not,
which they will be if we are composing operations. e.g. if some
create-lisp-op creates a lisp file from some higher-level input,
you need to still be able to use compile-op on that lisp file.
</p></dd></dl>
<span id="Variable-uiop_002fpathname_003a_002aunspecific_002dpathname_002dtype_002a"></span><dl class="def">
<dt id="index-_002aunspecific_002dpathname_002dtype_002a"><span class="category">Variable: </span><span><strong>*unspecific-pathname-type*</strong><a href='uiop.html#index-_002aunspecific_002dpathname_002dtype_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003a_002aunspecific_002dpathname_002dtype_002a"></span>
<p>Unspecific type component to use with the underlying implementation&rsquo;s <code>make-pathname</code>
</p></dd></dl>
<span id="Variable-uiop_002fpathname_003a_002awild_002ddirectory_002a"></span><dl class="def">
<dt id="index-_002awild_002ddirectory_002a"><span class="category">Variable: </span><span><strong>*wild-directory*</strong><a href='uiop.html#index-_002awild_002ddirectory_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003a_002awild_002ddirectory_002a"></span>
<p>A pathname object with wildcards for matching any subdirectory
</p></dd></dl>
<span id="Variable-uiop_002fpathname_003a_002awild_002dfile_002dfor_002ddirectory_002a"></span><dl class="def">
<dt id="index-_002awild_002dfile_002dfor_002ddirectory_002a"><span class="category">Variable: </span><span><strong>*wild-file-for-directory*</strong><a href='uiop.html#index-_002awild_002dfile_002dfor_002ddirectory_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003a_002awild_002dfile_002dfor_002ddirectory_002a"></span>
<p>A pathname object with wildcards for matching any file with <code>directory</code>
</p></dd></dl>
<span id="Variable-uiop_002fpathname_003a_002awild_002dfile_002a"></span><dl class="def">
<dt id="index-_002awild_002dfile_002a"><span class="category">Variable: </span><span><strong>*wild-file*</strong><a href='uiop.html#index-_002awild_002dfile_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003a_002awild_002dfile_002a"></span>
<p>A pathname object with wildcards for matching any file with <code>translate-pathname</code>
</p></dd></dl>
<span id="Variable-uiop_002fpathname_003a_002awild_002dinferiors_002a"></span><dl class="def">
<dt id="index-_002awild_002dinferiors_002a"><span class="category">Variable: </span><span><strong>*wild-inferiors*</strong><a href='uiop.html#index-_002awild_002dinferiors_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003a_002awild_002dinferiors_002a"></span>
<p>A pathname object with wildcards for matching any recursive subdirectory
</p></dd></dl>
<span id="Variable-uiop_002fpathname_003a_002awild_002dpath_002a"></span><dl class="def">
<dt id="index-_002awild_002dpath_002a"><span class="category">Variable: </span><span><strong>*wild-path*</strong><a href='uiop.html#index-_002awild_002dpath_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003a_002awild_002dpath_002a"></span>
<p>A pathname object with wildcards for matching any file in any recursive subdirectory
</p></dd></dl>
<span id="Variable-uiop_002fpathname_003a_002awild_002a"></span><dl class="def">
<dt id="index-_002awild_002a"><span class="category">Variable: </span><span><strong>*wild*</strong><a href='uiop.html#index-_002awild_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fpathname_003a_002awild_002a"></span>
<p>Wild component for use with <code>make-pathname</code>
</p></dd></dl>
<hr>
</div>
<div class="chapter" id="UIOP_002fFILESYSTEM">
<div class="header">
<p>
Next: <a href="uiop.html#UIOP_002fSTREAM" accesskey="n" rel="next">UIOP/STREAM</a>, Previous: <a href="uiop.html#UIOP_002fPATHNAME" accesskey="p" rel="prev">UIOP/PATHNAME</a>, Up: <a href="uiop.html#Top" accesskey="u" rel="up">UIOP</a> &nbsp; [<a href="uiop.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<span id="UIOP_002fFILESYSTEM-1"></span><h2 class="chapter">8 UIOP/FILESYSTEM</h2>
<span id="Function-uiop_002ffilesystem_003acall_002dwith_002dcurrent_002ddirectory"></span><dl class="def">
<dt id="index-call_002dwith_002dcurrent_002ddirectory"><span class="category">Function: </span><span><strong>call-with-current-directory</strong> <em>dir thunk</em><a href='uiop.html#index-call_002dwith_002dcurrent_002ddirectory' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003acall_002dwith_002dcurrent_002ddirectory"></span>
<p>call the <code>thunk</code> in a context where the current directory was changed to <code>dir</code>, if not <code>nil</code>.
Note that this operation is usually <code>not</code> thread-safe.
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003acollect_002dsub_002adirectories"></span><dl class="def">
<dt id="index-collect_002dsub_002adirectories"><span class="category">Function: </span><span><strong>collect-sub*directories</strong> <em>directory collectp recursep collector</em><a href='uiop.html#index-collect_002dsub_002adirectories' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003acollect_002dsub_002adirectories"></span>
<p>Given a <code>directory</code>, when <code>collectp</code> returns true when <code>call-function</code>&rsquo;ed with the directory,
call-function the <code>collector</code> function designator on the directory,
and recurse each of its subdirectories on which the <code>recursep</code> returns true when <code>call-function</code>&rsquo;ed with them.
This function will thus let you traverse a filesystem hierarchy,
superseding the functionality of <code>cl-fad:walk-directory</code>.
The behavior in presence of symlinks is not portable. Use IOlib to handle such situations.
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003adelete_002ddirectory_002dtree"></span><dl class="def">
<dt id="index-delete_002ddirectory_002dtree"><span class="category">Function: </span><span><strong>delete-directory-tree</strong> <em>directory-pathname &amp;key validate if-does-not-exist</em><a href='uiop.html#index-delete_002ddirectory_002dtree' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003adelete_002ddirectory_002dtree"></span>
<p>Delete a directory including all its recursive contents, aka rm -rf.
</p>
<p>To reduce the risk of infortunate mistakes, <code>directory-pathname</code> must be
a physical non-wildcard directory pathname (not namestring).
</p>
<p>If the directory does not exist, the <code>if-does-not-exist</code> argument specifies what happens:
if it is <code>:error</code> (the default), an error is signaled, whereas if it is <code>:ignore</code>, nothing is done.
</p>
<p>Furthermore, before any deletion is attempted, the <code>directory-pathname</code> must pass
the validation function designated (as per <code>ensure-function</code>) by the <code>validate</code> keyword argument
which in practice is thus compulsory, and validates by returning a non-NIL result.
If you&rsquo;re suicidal or extremely confident, just use <code>:validate</code> <code>t</code>.
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003adelete_002dempty_002ddirectory"></span><dl class="def">
<dt id="index-delete_002dempty_002ddirectory"><span class="category">Function: </span><span><strong>delete-empty-directory</strong> <em>directory-pathname</em><a href='uiop.html#index-delete_002dempty_002ddirectory' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003adelete_002dempty_002ddirectory"></span>
<p>Delete an empty directory
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003adelete_002dfile_002dif_002dexists"></span><dl class="def">
<dt id="index-delete_002dfile_002dif_002dexists"><span class="category">Function: </span><span><strong>delete-file-if-exists</strong> <em>x</em><a href='uiop.html#index-delete_002dfile_002dif_002dexists' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003adelete_002dfile_002dif_002dexists"></span>
<p>Delete a file <code>x</code> if it already exists
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003adirectory_002dexists_002dp"></span><dl class="def">
<dt id="index-directory_002dexists_002dp"><span class="category">Function: </span><span><strong>directory-exists-p</strong> <em>x</em><a href='uiop.html#index-directory_002dexists_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003adirectory_002dexists_002dp"></span>
<p>Is <code>x</code> the name of a directory that exists on the filesystem?
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003adirectory_002dfiles"></span><dl class="def">
<dt id="index-directory_002dfiles"><span class="category">Function: </span><span><strong>directory-files</strong> <em>directory &amp;optional pattern</em><a href='uiop.html#index-directory_002dfiles' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003adirectory_002dfiles"></span>
<p>Return a list of the files in a directory according to the <code>pattern</code>.
Subdirectories should <code>not</code> be returned.
<code>pattern</code> defaults to a pattern carefully chosen based on the implementation;
override the default at your own risk.
<code>directory-files</code> tries <code>not</code> to resolve symlinks if the implementation permits this,
but the behavior in presence of symlinks is not portable. Use IOlib to handle such situations.
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003adirectory_002a"></span><dl class="def">
<dt id="index-directory_002a"><span class="category">Function: </span><span><strong>directory*</strong> <em>pathname-spec &amp;rest keys &amp;key &amp;allow-other-keys </em><a href='uiop.html#index-directory_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003adirectory_002a"></span>
<p>Return a list of the entries in a directory by calling <code>directory</code>.
Try to override the defaults to not resolving symlinks, if implementation allows.
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003aensure_002dall_002ddirectories_002dexist"></span><dl class="def">
<dt id="index-ensure_002dall_002ddirectories_002dexist"><span class="category">Function: </span><span><strong>ensure-all-directories-exist</strong> <em>pathnames</em><a href='uiop.html#index-ensure_002dall_002ddirectories_002dexist' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003aensure_002dall_002ddirectories_002dexist"></span>
<p>Ensure that for every pathname in <code>pathnames</code>, we ensure its directories exist
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003afile_002dexists_002dp"></span><dl class="def">
<dt id="index-file_002dexists_002dp"><span class="category">Function: </span><span><strong>file-exists-p</strong> <em>x</em><a href='uiop.html#index-file_002dexists_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003afile_002dexists_002dp"></span>
<p>Is <code>x</code> the name of a file that exists on the filesystem?
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003afilter_002dlogical_002ddirectory_002dresults"></span><dl class="def">
<dt id="index-filter_002dlogical_002ddirectory_002dresults"><span class="category">Function: </span><span><strong>filter-logical-directory-results</strong> <em>directory entries merger</em><a href='uiop.html#index-filter_002dlogical_002ddirectory_002dresults' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003afilter_002dlogical_002ddirectory_002dresults"></span>
<p>If <code>directory</code> isn&rsquo;t a logical pathname, return <code>entries</code>. If it is,
given <code>entries</code> in the <code>directory</code>, remove the entries which are physical yet
when transformed by <code>merger</code> have a different <code>truename</code>.
Also remove duplicates as may appear with some translation rules.
This function is used as a helper to <code>directory-files</code> to avoid invalid entries
when using logical-pathnames.
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003aget_002dpathname_002ddefaults"></span><dl class="def">
<dt id="index-get_002dpathname_002ddefaults"><span class="category">Function: </span><span><strong>get-pathname-defaults</strong> <em>&amp;optional defaults</em><a href='uiop.html#index-get_002dpathname_002ddefaults' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003aget_002dpathname_002ddefaults"></span>
<p>Find the actual <code>defaults</code> to use for pathnames, including
resolving them with respect to <code>getcwd</code> if the <code>defaults</code> were relative
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003agetenv_002dabsolute_002ddirectories"></span><dl class="def">
<dt id="index-getenv_002dabsolute_002ddirectories"><span class="category">Function: </span><span><strong>getenv-absolute-directories</strong> <em>x</em><a href='uiop.html#index-getenv_002dabsolute_002ddirectories' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003agetenv_002dabsolute_002ddirectories"></span>
<p>Extract a list of absolute directories from a user-configured environment variable,
as per native OS. Any empty entries in the environment variable <code>x</code> will be returned as
NILs.
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003agetenv_002dabsolute_002ddirectory"></span><dl class="def">
<dt id="index-getenv_002dabsolute_002ddirectory"><span class="category">Function: </span><span><strong>getenv-absolute-directory</strong> <em>x</em><a href='uiop.html#index-getenv_002dabsolute_002ddirectory' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003agetenv_002dabsolute_002ddirectory"></span>
<p>Extract an absolute directory pathname from a user-configured environment variable,
as per native OS
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003agetenv_002dpathname"></span><dl class="def">
<dt id="index-getenv_002dpathname"><span class="category">Function: </span><span><strong>getenv-pathname</strong> <em>x &amp;rest constraints &amp;key ensure-directory want-directory on-error &amp;allow-other-keys </em><a href='uiop.html#index-getenv_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003agetenv_002dpathname"></span>
<p>Extract a pathname from a user-configured environment variable, as per native OS,
check constraints and normalize as per <code>ensure-pathname</code>.
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003agetenv_002dpathnames"></span><dl class="def">
<dt id="index-getenv_002dpathnames"><span class="category">Function: </span><span><strong>getenv-pathnames</strong> <em>x &amp;rest constraints &amp;key on-error &amp;allow-other-keys </em><a href='uiop.html#index-getenv_002dpathnames' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003agetenv_002dpathnames"></span>
<p>Extract a list of pathname from a user-configured environment variable, as per native OS,
check constraints and normalize each one as per <code>ensure-pathname</code>.
Any empty entries in the environment variable <code>x</code> will be returned as NILs.
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003ainter_002ddirectory_002dseparator"></span><dl class="def">
<dt id="index-inter_002ddirectory_002dseparator"><span class="category">Function: </span><span><strong>inter-directory-separator</strong><a href='uiop.html#index-inter_002ddirectory_002dseparator' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003ainter_002ddirectory_002dseparator"></span>
<p>What character does the current OS conventionally uses to separate directories?
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003alisp_002dimplementation_002ddirectory"></span><dl class="def">
<dt id="index-lisp_002dimplementation_002ddirectory"><span class="category">Function: </span><span><strong>lisp-implementation-directory</strong> <em>&amp;key truename</em><a href='uiop.html#index-lisp_002dimplementation_002ddirectory' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003alisp_002dimplementation_002ddirectory"></span>
<p>Where are the system files of the current installation of the CL implementation?
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003alisp_002dimplementation_002dpathname_002dp"></span><dl class="def">
<dt id="index-lisp_002dimplementation_002dpathname_002dp"><span class="category">Function: </span><span><strong>lisp-implementation-pathname-p</strong> <em>pathname</em><a href='uiop.html#index-lisp_002dimplementation_002dpathname_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003alisp_002dimplementation_002dpathname_002dp"></span>
<p>Is the <code>pathname</code> under the current installation of the CL implementation?
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003anative_002dnamestring"></span><dl class="def">
<dt id="index-native_002dnamestring"><span class="category">Function: </span><span><strong>native-namestring</strong> <em>x</em><a href='uiop.html#index-native_002dnamestring' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003anative_002dnamestring"></span>
<p>From a non-wildcard CL pathname, a return namestring suitable for passing to the operating system
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003aparse_002dnative_002dnamestring"></span><dl class="def">
<dt id="index-parse_002dnative_002dnamestring"><span class="category">Function: </span><span><strong>parse-native-namestring</strong> <em>string &amp;rest constraints &amp;key ensure-directory &amp;allow-other-keys </em><a href='uiop.html#index-parse_002dnative_002dnamestring' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003aparse_002dnative_002dnamestring"></span>
<p>From a native namestring suitable for use by the operating system, return
a CL pathname satisfying all the specified constraints as per <code>ensure-pathname</code>
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003aprobe_002dfile_002a"></span><dl class="def">
<dt id="index-probe_002dfile_002a"><span class="category">Function: </span><span><strong>probe-file*</strong> <em>p &amp;key truename</em><a href='uiop.html#index-probe_002dfile_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003aprobe_002dfile_002a"></span>
<p>when given a pathname <code>p</code> (designated by a string as per <code>parse-namestring</code>),
probes the filesystem for a file or directory with given pathname.
If it exists, return its truename if <code>truename</code> is true,
or the original (parsed) pathname if it is false (the default).
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003arename_002dfile_002doverwriting_002dtarget"></span><dl class="def">
<dt id="index-rename_002dfile_002doverwriting_002dtarget"><span class="category">Function: </span><span><strong>rename-file-overwriting-target</strong> <em>source target</em><a href='uiop.html#index-rename_002dfile_002doverwriting_002dtarget' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003arename_002dfile_002doverwriting_002dtarget"></span>
<p>Rename a file, overwriting any previous file with the <code>target</code> name,
in an atomic way if the implementation allows.
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003aresolve_002dsymlinks_002a"></span><dl class="def">
<dt id="index-resolve_002dsymlinks_002a"><span class="category">Function: </span><span><strong>resolve-symlinks*</strong> <em>path</em><a href='uiop.html#index-resolve_002dsymlinks_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003aresolve_002dsymlinks_002a"></span>
<p><code>resolve-symlinks</code> in <code>path</code> iff <code>*resolve-symlinks*</code> is <code>t</code> (the default).
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003aresolve_002dsymlinks"></span><dl class="def">
<dt id="index-resolve_002dsymlinks"><span class="category">Function: </span><span><strong>resolve-symlinks</strong> <em>path</em><a href='uiop.html#index-resolve_002dsymlinks' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003aresolve_002dsymlinks"></span>
<p>Do a best effort at resolving symlinks in <code>path</code>, returning a partially or totally resolved <code>path</code>.
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003asafe_002dfile_002dwrite_002ddate"></span><dl class="def">
<dt id="index-safe_002dfile_002dwrite_002ddate"><span class="category">Function: </span><span><strong>safe-file-write-date</strong> <em>pathname</em><a href='uiop.html#index-safe_002dfile_002dwrite_002ddate' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003asafe_002dfile_002dwrite_002ddate"></span>
<p>Safe variant of <code>file-write-date</code> that may return <code>nil</code> rather than raise an error.
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003asplit_002dnative_002dpathnames_002dstring"></span><dl class="def">
<dt id="index-split_002dnative_002dpathnames_002dstring"><span class="category">Function: </span><span><strong>split-native-pathnames-string</strong> <em>string &amp;rest constraints &amp;key &amp;allow-other-keys </em><a href='uiop.html#index-split_002dnative_002dpathnames_002dstring' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003asplit_002dnative_002dpathnames_002dstring"></span>
<p>Given a string of pathnames specified in native OS syntax, separate them in a list,
check constraints and normalize each one as per <code>ensure-pathname</code>,
where an empty string denotes <code>nil</code>.
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003asubdirectories"></span><dl class="def">
<dt id="index-subdirectories"><span class="category">Function: </span><span><strong>subdirectories</strong> <em>directory</em><a href='uiop.html#index-subdirectories' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003asubdirectories"></span>
<p>Given a <code>directory</code> pathname designator, return a list of the subdirectories under it.
The behavior in presence of symlinks is not portable. Use IOlib to handle such situations.
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003atruename_002a"></span><dl class="def">
<dt id="index-truename_002a"><span class="category">Function: </span><span><strong>truename*</strong> <em>p</em><a href='uiop.html#index-truename_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003atruename_002a"></span>
<p>Nicer variant of <code>truename</code> that plays well with <code>nil</code>, avoids logical pathname contexts, and tries both files and directories
</p></dd></dl>
<span id="Function-uiop_002ffilesystem_003atruenamize"></span><dl class="def">
<dt id="index-truenamize"><span class="category">Function: </span><span><strong>truenamize</strong> <em>pathname</em><a href='uiop.html#index-truenamize' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003atruenamize"></span>
<p>Resolve as much of a pathname as possible
</p></dd></dl>
<span id="Macro-uiop_002ffilesystem_003awith_002dcurrent_002ddirectory"></span><dl class="def">
<dt id="index-with_002dcurrent_002ddirectory"><span class="category">Macro: </span><span><strong>with-current-directory</strong> <em>(&amp;optional dir) &amp;body body</em><a href='uiop.html#index-with_002dcurrent_002ddirectory' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003awith_002dcurrent_002ddirectory"></span>
<p>Call <code>body</code> while the POSIX current working directory is set to <code>dir</code>
</p></dd></dl>
<span id="Variable-uiop_002ffilesystem_003a_002aresolve_002dsymlinks_002a"></span><dl class="def">
<dt id="index-_002aresolve_002dsymlinks_002a"><span class="category">Variable: </span><span><strong>*resolve-symlinks*</strong><a href='uiop.html#index-_002aresolve_002dsymlinks_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002ffilesystem_003a_002aresolve_002dsymlinks_002a"></span>
<p>Determine whether or not ASDF resolves symlinks when defining systems.
Defaults to <code>t</code>.
</p></dd></dl>
<hr>
</div>
<div class="chapter" id="UIOP_002fSTREAM">
<div class="header">
<p>
Next: <a href="uiop.html#UIOP_002fIMAGE" accesskey="n" rel="next">UIOP/IMAGE</a>, Previous: <a href="uiop.html#UIOP_002fFILESYSTEM" accesskey="p" rel="prev">UIOP/FILESYSTEM</a>, Up: <a href="uiop.html#Top" accesskey="u" rel="up">UIOP</a> &nbsp; [<a href="uiop.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<span id="UIOP_002fSTREAM-1"></span><h2 class="chapter">9 UIOP/STREAM</h2>
<span id="Function-uiop_002fstream_003aadd_002dpathname_002dsuffix"></span><dl class="def">
<dt id="index-add_002dpathname_002dsuffix"><span class="category">Function: </span><span><strong>add-pathname-suffix</strong> <em>pathname suffix &amp;rest keys</em><a href='uiop.html#index-add_002dpathname_002dsuffix' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aadd_002dpathname_002dsuffix"></span>
<p>Add a <code>suffix</code> to the name of a <code>pathname</code>, return a new pathname.
Further <code>keys</code> can be passed to <code>make-pathname</code>.
</p></dd></dl>
<span id="Function-uiop_002fstream_003aalways_002ddefault_002dencoding"></span><dl class="def">
<dt id="index-always_002ddefault_002dencoding"><span class="category">Function: </span><span><strong>always-default-encoding</strong> <em>pathname</em><a href='uiop.html#index-always_002ddefault_002dencoding' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aalways_002ddefault_002dencoding"></span>
<p>Trivial function to use as *encoding-detection-hook*,
always &rsquo;detects&rsquo; the *default-encoding*
</p></dd></dl>
<span id="Function-uiop_002fstream_003acall_002dwith_002dinput_002dfile"></span><dl class="def">
<dt id="index-call_002dwith_002dinput_002dfile"><span class="category">Function: </span><span><strong>call-with-input-file</strong> <em>pathname thunk &amp;key element-type external-format if-does-not-exist</em><a href='uiop.html#index-call_002dwith_002dinput_002dfile' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003acall_002dwith_002dinput_002dfile"></span>
<p>Open <code>file</code> for input with given recognizes options, call <code>thunk</code> with the resulting stream.
Other keys are accepted but discarded.
</p></dd></dl>
<span id="Function-uiop_002fstream_003acall_002dwith_002dnull_002dinput"></span><dl class="def">
<dt id="index-call_002dwith_002dnull_002dinput"><span class="category">Function: </span><span><strong>call-with-null-input</strong> <em>fun &amp;key element-type external-format if-does-not-exist</em><a href='uiop.html#index-call_002dwith_002dnull_002dinput' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003acall_002dwith_002dnull_002dinput"></span>
<p>Call <code>fun</code> with an input stream that always returns end of file.
The keyword arguments are allowed for backward compatibility, but are ignored.
</p></dd></dl>
<span id="Function-uiop_002fstream_003acall_002dwith_002dnull_002doutput"></span><dl class="def">
<dt id="index-call_002dwith_002dnull_002doutput"><span class="category">Function: </span><span><strong>call-with-null-output</strong> <em>fun &amp;key element-type external-format if-exists if-does-not-exist</em><a href='uiop.html#index-call_002dwith_002dnull_002doutput' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003acall_002dwith_002dnull_002doutput"></span>
<p>Call <code>fun</code> with an output stream that discards all output.
The keyword arguments are allowed for backward compatibility, but are ignored.
</p></dd></dl>
<span id="Function-uiop_002fstream_003acall_002dwith_002doutput_002dfile"></span><dl class="def">
<dt id="index-call_002dwith_002doutput_002dfile"><span class="category">Function: </span><span><strong>call-with-output-file</strong> <em>pathname thunk &amp;key element-type external-format if-exists if-does-not-exist</em><a href='uiop.html#index-call_002dwith_002doutput_002dfile' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003acall_002dwith_002doutput_002dfile"></span>
<p>Open <code>file</code> for input with given recognizes options, call <code>thunk</code> with the resulting stream.
Other keys are accepted but discarded.
</p></dd></dl>
<span id="Function-uiop_002fstream_003acall_002dwith_002dstaging_002dpathname"></span><dl class="def">
<dt id="index-call_002dwith_002dstaging_002dpathname"><span class="category">Function: </span><span><strong>call-with-staging-pathname</strong> <em>pathname fun</em><a href='uiop.html#index-call_002dwith_002dstaging_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003acall_002dwith_002dstaging_002dpathname"></span>
<p>Calls <code>fun</code> with a staging pathname, and atomically
renames the staging pathname to the <code>pathname</code> in the end.
<code>nb:</code> this protects only against failure of the program, not against concurrent attempts.
For the latter case, we ought pick a random suffix and atomically open it.
</p></dd></dl>
<span id="Function-uiop_002fstream_003acall_002dwith_002dtemporary_002dfile"></span><dl class="def">
<dt id="index-call_002dwith_002dtemporary_002dfile"><span class="category">Function: </span><span><strong>call-with-temporary-file</strong> <em>thunk &amp;key want-stream-p want-pathname-p direction keep after directory type prefix suffix element-type external-format</em><a href='uiop.html#index-call_002dwith_002dtemporary_002dfile' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003acall_002dwith_002dtemporary_002dfile"></span>
<p>Call a <code>thunk</code> with stream and/or pathname arguments identifying a temporary file.
</p>
<p>The temporary file&rsquo;s pathname will be based on concatenating
<code>prefix</code> (or &quot;tmp&quot; if it&rsquo;s <code>nil</code>), a random alphanumeric string,
and optional <code>suffix</code> (defaults to &quot;-tmp&quot; if a type was provided)
and <code>type</code> (defaults to &quot;tmp&quot;, using a dot as separator if not <code>nil</code>),
within <code>directory</code> (defaulting to the <code>temporary-directory</code>) if the <code>prefix</code> isn&rsquo;t absolute.
</p>
<p>The file will be open with specified <code>direction</code> (defaults to <code>:io</code>),
<code>element-type</code> (defaults to <code>*default-stream-element-type*</code>) and
<code>external-format</code> (defaults to <code>*utf-8-external-format*</code>).
If <code>want-stream-p</code> is true (the defaults to <code>t</code>), then <code>thunk</code> will then be <code>call-function</code>&rsquo;ed
with the stream and the pathname (if <code>want-pathname-p</code> is true, defaults to <code>t</code>),
and stream will be closed after the <code>thunk</code> exits (either normally or abnormally).
If <code>want-stream-p</code> is false, then <code>want-pathame-p</code> must be true, and then
<code>thunk</code> is only <code>call-function</code>&rsquo;ed after the stream is closed, with the pathname as argument.
Upon exit of <code>thunk</code>, the <code>after</code> thunk if defined is <code>call-function</code>&rsquo;ed with the pathname as argument.
If <code>after</code> is defined, its results are returned, otherwise, the results of <code>thunk</code> are returned.
Finally, the file will be deleted, unless the <code>keep</code> argument when <code>call-function</code>&rsquo;ed returns true.
</p></dd></dl>
<span id="Function-uiop_002fstream_003aconcatenate_002dfiles"></span><dl class="def">
<dt id="index-concatenate_002dfiles"><span class="category">Function: </span><span><strong>concatenate-files</strong> <em>inputs output</em><a href='uiop.html#index-concatenate_002dfiles' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aconcatenate_002dfiles"></span>
<p>create a new <code>output</code> file the contents of which a the concatenate of the <code>inputs</code> files.
</p></dd></dl>
<span id="Function-uiop_002fstream_003acopy_002dfile"></span><dl class="def">
<dt id="index-copy_002dfile"><span class="category">Function: </span><span><strong>copy-file</strong> <em>input output</em><a href='uiop.html#index-copy_002dfile' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003acopy_002dfile"></span>
<p>Copy contents of the <code>input</code> file to the <code>output</code> file
</p></dd></dl>
<span id="Function-uiop_002fstream_003acopy_002dstream_002dto_002dstream"></span><dl class="def">
<dt id="index-copy_002dstream_002dto_002dstream"><span class="category">Function: </span><span><strong>copy-stream-to-stream</strong> <em>input output &amp;key element-type buffer-size linewise prefix</em><a href='uiop.html#index-copy_002dstream_002dto_002dstream' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003acopy_002dstream_002dto_002dstream"></span>
<p>Copy the contents of the <code>input</code> stream into the <code>output</code> stream.
If <code>linewise</code> is true, then read and copy the stream line by line, with an optional <code>prefix</code>.
Otherwise, using <code>write-sequence</code> using a buffer of size <code>buffer-size</code>.
</p></dd></dl>
<span id="Function-uiop_002fstream_003adefault_002dencoding_002dexternal_002dformat"></span><dl class="def">
<dt id="index-default_002dencoding_002dexternal_002dformat"><span class="category">Function: </span><span><strong>default-encoding-external-format</strong> <em>encoding</em><a href='uiop.html#index-default_002dencoding_002dexternal_002dformat' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003adefault_002dencoding_002dexternal_002dformat"></span>
<p>Default, ignorant, function to transform a character <code>encoding</code> as a
portable keyword to an implementation-dependent <code>external-format</code> specification.
Load system <code>asdf-encodings</code> to hook in a better one.
</p></dd></dl>
<span id="Function-uiop_002fstream_003adefault_002dtemporary_002ddirectory"></span><dl class="def">
<dt id="index-default_002dtemporary_002ddirectory"><span class="category">Function: </span><span><strong>default-temporary-directory</strong><a href='uiop.html#index-default_002dtemporary_002ddirectory' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003adefault_002dtemporary_002ddirectory"></span>
<p>Return a default directory to use for temporary files
</p></dd></dl>
<span id="Function-uiop_002fstream_003adetect_002dencoding"></span><dl class="def">
<dt id="index-detect_002dencoding"><span class="category">Function: </span><span><strong>detect-encoding</strong> <em>pathname</em><a href='uiop.html#index-detect_002dencoding' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003adetect_002dencoding"></span>
<p>Detects the encoding of a specified file, going through user-configurable hooks
</p></dd></dl>
<span id="Function-uiop_002fstream_003aencoding_002dexternal_002dformat"></span><dl class="def">
<dt id="index-encoding_002dexternal_002dformat"><span class="category">Function: </span><span><strong>encoding-external-format</strong> <em>encoding</em><a href='uiop.html#index-encoding_002dexternal_002dformat' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aencoding_002dexternal_002dformat"></span>
<p>Transform a portable <code>encoding</code> keyword to an implementation-dependent <code>external-format</code>,
going through all the proper hooks.
</p></dd></dl>
<span id="Function-uiop_002fstream_003aeval_002dinput"></span><dl class="def">
<dt id="index-eval_002dinput"><span class="category">Function: </span><span><strong>eval-input</strong> <em>input</em><a href='uiop.html#index-eval_002dinput' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aeval_002dinput"></span>
<p>Portably read and evaluate forms from <code>input</code>, return the last values.
</p></dd></dl>
<span id="Function-uiop_002fstream_003aeval_002dthunk"></span><dl class="def">
<dt id="index-eval_002dthunk"><span class="category">Function: </span><span><strong>eval-thunk</strong> <em>thunk</em><a href='uiop.html#index-eval_002dthunk' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aeval_002dthunk"></span>
<p>Evaluate a <code>thunk</code> of code:
If a function, <code>funcall</code> it without arguments.
If a constant literal and not a sequence, return it.
If a cons or a symbol, <code>eval</code> it.
If a string, repeatedly read and evaluate from it, returning the last values.
</p></dd></dl>
<span id="Function-uiop_002fstream_003afinish_002doutputs"></span><dl class="def">
<dt id="index-finish_002doutputs"><span class="category">Function: </span><span><strong>finish-outputs</strong> <em>&amp;rest streams</em><a href='uiop.html#index-finish_002doutputs' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003afinish_002doutputs"></span>
<p>Finish output on the main output streams as well as any specified one.
Useful for portably flushing I/O before user input or program exit.
</p></dd></dl>
<span id="Function-uiop_002fstream_003aformat_0021"></span><dl class="def">
<dt id="index-format_0021"><span class="category">Function: </span><span><strong>format!</strong> <em>stream format &amp;rest args</em><a href='uiop.html#index-format_0021' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aformat_0021"></span>
<p>Just like format, but call finish-outputs before and after the output.
</p></dd></dl>
<span id="Function-uiop_002fstream_003ainput_002dstring"></span><dl class="def">
<dt id="index-input_002dstring"><span class="category">Function: </span><span><strong>input-string</strong> <em>&amp;optional input</em><a href='uiop.html#index-input_002dstring' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003ainput_002dstring"></span>
<p>If the desired <code>input</code> is a string, return that string; otherwise slurp the <code>input</code> into a string
and return that
</p></dd></dl>
<span id="Function-uiop_002fstream_003anull_002ddevice_002dpathname"></span><dl class="def">
<dt id="index-null_002ddevice_002dpathname"><span class="category">Function: </span><span><strong>null-device-pathname</strong><a href='uiop.html#index-null_002ddevice_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003anull_002ddevice_002dpathname"></span>
<p>Pathname to a bit bucket device that discards any information written to it
and always returns <code>eof</code> when read from
</p></dd></dl>
<span id="Function-uiop_002fstream_003aoutput_002dstring"></span><dl class="def">
<dt id="index-output_002dstring"><span class="category">Function: </span><span><strong>output-string</strong> <em>string &amp;optional output</em><a href='uiop.html#index-output_002dstring' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aoutput_002dstring"></span>
<p>If the desired <code>output</code> is not <code>nil</code>, print the string to the output; otherwise return the string
</p></dd></dl>
<span id="Function-uiop_002fstream_003aprintln"></span><dl class="def">
<dt id="index-println"><span class="category">Function: </span><span><strong>println</strong> <em>x &amp;optional stream</em><a href='uiop.html#index-println' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aprintln"></span>
<p>Variant of <code>princ</code> that also calls <code>terpri</code> afterwards
</p></dd></dl>
<span id="Function-uiop_002fstream_003aread_002dfile_002dform"></span><dl class="def">
<dt id="index-read_002dfile_002dform"><span class="category">Function: </span><span><strong>read-file-form</strong> <em>file &amp;rest keys &amp;key at &amp;allow-other-keys </em><a href='uiop.html#index-read_002dfile_002dform' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aread_002dfile_002dform"></span>
<p>Open input <code>file</code> with option <code>keys</code> (except <code>at</code>),
and read its contents as per <code>slurp-stream-form</code> with given <code>at</code> specifier.
<code>beware:</code> be sure to use <code>with-safe-io-syntax</code>, or some variant thereof
</p></dd></dl>
<span id="Function-uiop_002fstream_003aread_002dfile_002dforms"></span><dl class="def">
<dt id="index-read_002dfile_002dforms"><span class="category">Function: </span><span><strong>read-file-forms</strong> <em>file &amp;rest keys &amp;key count &amp;allow-other-keys </em><a href='uiop.html#index-read_002dfile_002dforms' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aread_002dfile_002dforms"></span>
<p>Open input <code>file</code> with option <code>keys</code> (except <code>count</code>),
and read its contents as per <code>slurp-stream-forms</code> with given <code>count</code>.
If <code>count</code> is null, read to the end of the stream;
if <code>count</code> is an integer, stop after <code>count</code> forms were read.
<code>beware:</code> be sure to use <code>with-safe-io-syntax</code>, or some variant thereof
</p></dd></dl>
<span id="Function-uiop_002fstream_003aread_002dfile_002dline"></span><dl class="def">
<dt id="index-read_002dfile_002dline"><span class="category">Function: </span><span><strong>read-file-line</strong> <em>file &amp;rest keys &amp;key at &amp;allow-other-keys </em><a href='uiop.html#index-read_002dfile_002dline' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aread_002dfile_002dline"></span>
<p>Open input <code>file</code> with option <code>keys</code> (except <code>at</code>),
and read its contents as per <code>slurp-stream-line</code> with given <code>at</code> specifier.
<code>beware:</code> be sure to use <code>with-safe-io-syntax</code>, or some variant thereof
</p></dd></dl>
<span id="Function-uiop_002fstream_003aread_002dfile_002dlines"></span><dl class="def">
<dt id="index-read_002dfile_002dlines"><span class="category">Function: </span><span><strong>read-file-lines</strong> <em>file &amp;rest keys</em><a href='uiop.html#index-read_002dfile_002dlines' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aread_002dfile_002dlines"></span>
<p>Open <code>file</code> with option <code>keys</code>, read its contents as a list of lines
<code>beware:</code> be sure to use <code>with-safe-io-syntax</code>, or some variant thereof
</p></dd></dl>
<span id="Function-uiop_002fstream_003aread_002dfile_002dstring"></span><dl class="def">
<dt id="index-read_002dfile_002dstring"><span class="category">Function: </span><span><strong>read-file-string</strong> <em>file &amp;rest keys</em><a href='uiop.html#index-read_002dfile_002dstring' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aread_002dfile_002dstring"></span>
<p>Open <code>file</code> with option <code>keys</code>, read its contents as a string
</p></dd></dl>
<span id="Function-uiop_002fstream_003asafe_002dformat_0021"></span><dl class="def">
<dt id="index-safe_002dformat_0021"><span class="category">Function: </span><span><strong>safe-format!</strong> <em>stream format &amp;rest args</em><a href='uiop.html#index-safe_002dformat_0021' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003asafe_002dformat_0021"></span>
<p>Variant of <code>format</code> that is safe against both
dangerous syntax configuration and errors while printing.
</p></dd></dl>
<span id="Function-uiop_002fstream_003asafe_002dread_002dfile_002dform"></span><dl class="def">
<dt id="index-safe_002dread_002dfile_002dform"><span class="category">Function: </span><span><strong>safe-read-file-form</strong> <em>pathname &amp;rest keys &amp;key package &amp;allow-other-keys </em><a href='uiop.html#index-safe_002dread_002dfile_002dform' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003asafe_002dread_002dfile_002dform"></span>
<p>Reads the specified form from the top of a file using a safe standardized syntax.
Extracts the form using <code>read-file-form</code>,
within an <code>with-safe-io-syntax</code> using the specified <code>package</code>.
</p></dd></dl>
<span id="Function-uiop_002fstream_003asafe_002dread_002dfile_002dline"></span><dl class="def">
<dt id="index-safe_002dread_002dfile_002dline"><span class="category">Function: </span><span><strong>safe-read-file-line</strong> <em>pathname &amp;rest keys &amp;key package &amp;allow-other-keys </em><a href='uiop.html#index-safe_002dread_002dfile_002dline' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003asafe_002dread_002dfile_002dline"></span>
<p>Reads the specified line from the top of a file using a safe standardized syntax.
Extracts the line using <code>read-file-line</code>,
within an <code>with-safe-io-syntax</code> using the specified <code>package</code>.
</p></dd></dl>
<span id="Function-uiop_002fstream_003asafe_002dread_002dfrom_002dstring"></span><dl class="def">
<dt id="index-safe_002dread_002dfrom_002dstring"><span class="category">Function: </span><span><strong>safe-read-from-string</strong> <em>string &amp;key package eof-error-p eof-value start end preserve-whitespace</em><a href='uiop.html#index-safe_002dread_002dfrom_002dstring' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003asafe_002dread_002dfrom_002dstring"></span>
<p>Read from <code>string</code> using a safe syntax, as per <code>with-safe-io-syntax</code>
</p></dd></dl>
<span id="Function-uiop_002fstream_003asetup_002dtemporary_002ddirectory"></span><dl class="def">
<dt id="index-setup_002dtemporary_002ddirectory"><span class="category">Function: </span><span><strong>setup-temporary-directory</strong><a href='uiop.html#index-setup_002dtemporary_002ddirectory' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003asetup_002dtemporary_002ddirectory"></span>
<p>Configure a default temporary directory to use.
</p></dd></dl>
<span id="Function-uiop_002fstream_003aslurp_002dstream_002dform"></span><dl class="def">
<dt id="index-slurp_002dstream_002dform"><span class="category">Function: </span><span><strong>slurp-stream-form</strong> <em>input &amp;key at</em><a href='uiop.html#index-slurp_002dstream_002dform' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aslurp_002dstream_002dform"></span>
<p>Read the contents of the <code>input</code> stream as a list of forms,
then return the <code>access-at</code> of these forms following the <code>at</code>.
<code>at</code> defaults to <code>0</code>, i.e. return the first form.
<code>at</code> is typically a list of integers.
If <code>at</code> is <code>nil</code>, it will return all the forms in the file.
</p>
<p>The stream will not be read beyond the Nth form,
where <code>n</code> is the index specified by path,
if path is either an integer or a list that starts with an integer.
</p>
<p><code>beware:</code> be sure to use <code>with-safe-io-syntax</code>, or some variant thereof
</p></dd></dl>
<span id="Function-uiop_002fstream_003aslurp_002dstream_002dforms"></span><dl class="def">
<dt id="index-slurp_002dstream_002dforms"><span class="category">Function: </span><span><strong>slurp-stream-forms</strong> <em>input &amp;key count</em><a href='uiop.html#index-slurp_002dstream_002dforms' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aslurp_002dstream_002dforms"></span>
<p>Read the contents of the <code>input</code> stream as a list of forms,
and return those forms.
</p>
<p>If <code>count</code> is null, read to the end of the stream;
if <code>count</code> is an integer, stop after <code>count</code> forms were read.
</p>
<p><code>beware:</code> be sure to use <code>with-safe-io-syntax</code>, or some variant thereof
</p></dd></dl>
<span id="Function-uiop_002fstream_003aslurp_002dstream_002dline"></span><dl class="def">
<dt id="index-slurp_002dstream_002dline"><span class="category">Function: </span><span><strong>slurp-stream-line</strong> <em>input &amp;key at</em><a href='uiop.html#index-slurp_002dstream_002dline' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aslurp_002dstream_002dline"></span>
<p>Read the contents of the <code>input</code> stream as a list of lines,
then return the <code>access-at</code> of that list of lines using the <code>at</code> specifier.
<code>path</code> defaults to <code>0</code>, i.e. return the first line.
<code>path</code> is typically an integer, or a list of an integer and a function.
If <code>path</code> is <code>nil</code>, it will return all the lines in the file.
</p>
<p>The stream will not be read beyond the Nth lines,
where <code>n</code> is the index specified by path
if path is either an integer or a list that starts with an integer.
</p></dd></dl>
<span id="Function-uiop_002fstream_003aslurp_002dstream_002dlines"></span><dl class="def">
<dt id="index-slurp_002dstream_002dlines"><span class="category">Function: </span><span><strong>slurp-stream-lines</strong> <em>input &amp;key count</em><a href='uiop.html#index-slurp_002dstream_002dlines' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aslurp_002dstream_002dlines"></span>
<p>Read the contents of the <code>input</code> stream as a list of lines, return those lines.
</p>
<p>Note: relies on the Lisp&rsquo;s <code>read-line</code>, but additionally removes any remaining CR
from the line-ending if the file or stream had CR+LF but Lisp only removed LF.
</p>
<p>Read no more than <code>count</code> lines.
</p></dd></dl>
<span id="Function-uiop_002fstream_003aslurp_002dstream_002dstring"></span><dl class="def">
<dt id="index-slurp_002dstream_002dstring"><span class="category">Function: </span><span><strong>slurp-stream-string</strong> <em>input &amp;key element-type stripped</em><a href='uiop.html#index-slurp_002dstream_002dstring' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003aslurp_002dstream_002dstring"></span>
<p>Read the contents of the <code>input</code> stream as a string
</p></dd></dl>
<span id="Function-uiop_002fstream_003astandard_002deval_002dthunk"></span><dl class="def">
<dt id="index-standard_002deval_002dthunk"><span class="category">Function: </span><span><strong>standard-eval-thunk</strong> <em>thunk &amp;key package</em><a href='uiop.html#index-standard_002deval_002dthunk' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003astandard_002deval_002dthunk"></span>
<p>Like <code>eval-thunk</code>, but in a more standardized evaluation context.
</p></dd></dl>
<span id="Function-uiop_002fstream_003atemporary_002ddirectory"></span><dl class="def">
<dt id="index-temporary_002ddirectory"><span class="category">Function: </span><span><strong>temporary-directory</strong><a href='uiop.html#index-temporary_002ddirectory' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003atemporary_002ddirectory"></span>
<p>Return a directory to use for temporary files
</p></dd></dl>
<span id="Function-uiop_002fstream_003atmpize_002dpathname"></span><dl class="def">
<dt id="index-tmpize_002dpathname"><span class="category">Function: </span><span><strong>tmpize-pathname</strong> <em>x</em><a href='uiop.html#index-tmpize_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003atmpize_002dpathname"></span>
<p>Return a new pathname modified from <code>x</code> by adding a trivial random suffix.
A new empty file with said temporary pathname is created, to ensure there is no
clash with any concurrent process attempting the same thing.
</p></dd></dl>
<span id="Function-uiop_002fstream_003awriteln"></span><dl class="def">
<dt id="index-writeln"><span class="category">Function: </span><span><strong>writeln</strong> <em>x &amp;rest keys &amp;key stream &amp;allow-other-keys </em><a href='uiop.html#index-writeln' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003awriteln"></span>
<p>Variant of <code>write</code> that also calls <code>terpri</code> afterwards
</p></dd></dl>
<span id="Macro-uiop_002fstream_003awith_002dinput"></span><dl class="def">
<dt id="index-with_002dinput"><span class="category">Macro: </span><span><strong>with-input</strong> <em>(input-var &amp;optional value) &amp;body body</em><a href='uiop.html#index-with_002dinput' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003awith_002dinput"></span>
<p>Bind <code>input-var</code> to an input stream, coercing <code>value</code> (default: previous binding of <code>input-var</code>)
as per <code>call-with-input</code>, and evaluate <code>body</code> within the scope of this binding.
</p></dd></dl>
<span id="Macro-uiop_002fstream_003awith_002dnull_002dinput"></span><dl class="def">
<dt id="index-with_002dnull_002dinput"><span class="category">Macro: </span><span><strong>with-null-input</strong> <em>(var &amp;rest keys &amp;key element-type external-format if-does-not-exist) &amp;body body</em><a href='uiop.html#index-with_002dnull_002dinput' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003awith_002dnull_002dinput"></span>
<p>Evaluate <code>body</code> in a context when <code>var</code> is bound to an input stream that always returns end of file.
The keyword arguments are allowed for backward compatibility, but are ignored.
</p></dd></dl>
<span id="Macro-uiop_002fstream_003awith_002dnull_002doutput"></span><dl class="def">
<dt id="index-with_002dnull_002doutput"><span class="category">Macro: </span><span><strong>with-null-output</strong> <em>(var &amp;rest keys &amp;key element-type external-format if-does-not-exist if-exists) &amp;body body</em><a href='uiop.html#index-with_002dnull_002doutput' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003awith_002dnull_002doutput"></span>
<p>Evaluate <code>body</code> in a context when <code>var</code> is bound to an output stream that discards all output.
The keyword arguments are allowed for backward compatibility, but are ignored.
</p></dd></dl>
<span id="Macro-uiop_002fstream_003awith_002doutput"></span><dl class="def">
<dt id="index-with_002doutput"><span class="category">Macro: </span><span><strong>with-output</strong> <em>(output-var &amp;optional value &amp;key element-type) &amp;body body</em><a href='uiop.html#index-with_002doutput' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003awith_002doutput"></span>
<p>Bind <code>output-var</code> to an output stream obtained from <code>value</code> (default: previous binding
of <code>output-var</code>) treated as a stream designator per <code>call-with-output</code>. Evaluate <code>body</code> in
the scope of this binding.
</p></dd></dl>
<span id="Macro-uiop_002fstream_003awith_002dsafe_002dio_002dsyntax"></span><dl class="def">
<dt id="index-with_002dsafe_002dio_002dsyntax"><span class="category">Macro: </span><span><strong>with-safe-io-syntax</strong> <em>(&amp;key package) &amp;body body</em><a href='uiop.html#index-with_002dsafe_002dio_002dsyntax' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003awith_002dsafe_002dio_002dsyntax"></span>
<p>Establish safe CL reader options around the evaluation of <code>body</code>
</p></dd></dl>
<span id="Macro-uiop_002fstream_003awith_002dstaging_002dpathname"></span><dl class="def">
<dt id="index-with_002dstaging_002dpathname"><span class="category">Macro: </span><span><strong>with-staging-pathname</strong> <em>(pathname-var &amp;optional pathname-value) &amp;body body</em><a href='uiop.html#index-with_002dstaging_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003awith_002dstaging_002dpathname"></span>
<p>Trivial syntax wrapper for <code>call-with-staging-pathname</code>
</p></dd></dl>
<span id="Macro-uiop_002fstream_003awith_002dtemporary_002dfile"></span><dl class="def">
<dt id="index-with_002dtemporary_002dfile"><span class="category">Macro: </span><span><strong>with-temporary-file</strong> <em>(&amp;key stream pathname directory prefix suffix type keep direction element-type external-format) &amp;body body</em><a href='uiop.html#index-with_002dtemporary_002dfile' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003awith_002dtemporary_002dfile"></span>
<p>Evaluate <code>body</code> where the symbols specified by keyword arguments
<code>stream</code> and <code>pathname</code> (if respectively specified) are bound corresponding
to a newly created temporary file ready for I/O, as per <code>call-with-temporary-file</code>.
At least one of <code>stream</code> or <code>pathname</code> must be specified.
If the <code>stream</code> is not specified, it will be closed before the <code>body</code> is evaluated.
If <code>stream</code> is specified, then the <code>:close-stream</code> label if it appears in the <code>body</code>,
separates forms run before and after the stream is closed.
The values of the last form of the <code>body</code> (not counting the separating <code>:close-stream</code>) are returned.
Upon success, the <code>keep</code> form is evaluated and the file is is deleted unless it evaluates to <code>true</code>.
</p></dd></dl>
<span id="Variable-uiop_002fstream_003a_002adefault_002dencoding_002a"></span><dl class="def">
<dt id="index-_002adefault_002dencoding_002a"><span class="category">Variable: </span><span><strong>*default-encoding*</strong><a href='uiop.html#index-_002adefault_002dencoding_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003a_002adefault_002dencoding_002a"></span>
<p>Default encoding for source files.
The default value :utf-8 is the portable thing.
The legacy behavior was :default.
If you (asdf:load-system :asdf-encodings) then
you will have autodetection via *encoding-detection-hook* below,
reading emacs-style <code>-*-</code> coding: utf-8 <code>-*-</code> specifications,
and falling back to utf-8 or latin1 if nothing is specified.
</p></dd></dl>
<span id="Variable-uiop_002fstream_003a_002adefault_002dstream_002delement_002dtype_002a"></span><dl class="def">
<dt id="index-_002adefault_002dstream_002delement_002dtype_002a"><span class="category">Variable: </span><span><strong>*default-stream-element-type*</strong><a href='uiop.html#index-_002adefault_002dstream_002delement_002dtype_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003a_002adefault_002dstream_002delement_002dtype_002a"></span>
<p>default element-type for open (depends on the current CL implementation)
</p></dd></dl>
<span id="Variable-uiop_002fstream_003a_002aencoding_002ddetection_002dhook_002a"></span><dl class="def">
<dt id="index-_002aencoding_002ddetection_002dhook_002a"><span class="category">Variable: </span><span><strong>*encoding-detection-hook*</strong><a href='uiop.html#index-_002aencoding_002ddetection_002dhook_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003a_002aencoding_002ddetection_002dhook_002a"></span>
<p>Hook for an extension to define a function to automatically detect a file&rsquo;s encoding
</p></dd></dl>
<span id="Variable-uiop_002fstream_003a_002aencoding_002dexternal_002dformat_002dhook_002a"></span><dl class="def">
<dt id="index-_002aencoding_002dexternal_002dformat_002dhook_002a"><span class="category">Variable: </span><span><strong>*encoding-external-format-hook*</strong><a href='uiop.html#index-_002aencoding_002dexternal_002dformat_002dhook_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003a_002aencoding_002dexternal_002dformat_002dhook_002a"></span>
<p>Hook for an extension (e.g. <code>asdf-encodings</code>) to define a better mapping
from non-default encodings to and implementation-defined external-format&rsquo;s
</p></dd></dl>
<span id="Variable-uiop_002fstream_003a_002astderr_002a"></span><dl class="def">
<dt id="index-_002astderr_002a"><span class="category">Variable: </span><span><strong>*stderr*</strong><a href='uiop.html#index-_002astderr_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003a_002astderr_002a"></span>
<p>the original error output stream at startup
</p></dd></dl>
<span id="Variable-uiop_002fstream_003a_002astdin_002a"></span><dl class="def">
<dt id="index-_002astdin_002a"><span class="category">Variable: </span><span><strong>*stdin*</strong><a href='uiop.html#index-_002astdin_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003a_002astdin_002a"></span>
<p>the original standard input stream at startup
</p></dd></dl>
<span id="Variable-uiop_002fstream_003a_002astdout_002a"></span><dl class="def">
<dt id="index-_002astdout_002a"><span class="category">Variable: </span><span><strong>*stdout*</strong><a href='uiop.html#index-_002astdout_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003a_002astdout_002a"></span>
<p>the original standard output stream at startup
</p></dd></dl>
<span id="Variable-uiop_002fstream_003a_002atemporary_002ddirectory_002a"></span><dl class="def">
<dt id="index-_002atemporary_002ddirectory_002a"><span class="category">Variable: </span><span><strong>*temporary-directory*</strong><a href='uiop.html#index-_002atemporary_002ddirectory_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003a_002atemporary_002ddirectory_002a"></span>
<p>User-configurable location for temporary files
</p></dd></dl>
<span id="Variable-uiop_002fstream_003a_002autf_002d8_002dexternal_002dformat_002a"></span><dl class="def">
<dt id="index-_002autf_002d8_002dexternal_002dformat_002a"><span class="category">Variable: </span><span><strong>*utf-8-external-format*</strong><a href='uiop.html#index-_002autf_002d8_002dexternal_002dformat_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fstream_003a_002autf_002d8_002dexternal_002dformat_002a"></span>
<p>Default :external-format argument to pass to <code>cl:open</code> and also
<code>cl:load</code> or <code>cl:compile-file</code> to best process a <code>utf-8</code> encoded file.
On modern implementations, this will decode <code>utf-8</code> code points as CL characters.
On legacy implementations, it may fall back on some 8-bit encoding,
with non-ASCII code points being read as several CL characters;
hopefully, if done consistently, that won&rsquo;t affect program behavior too much.
</p></dd></dl>
<hr>
</div>
<div class="chapter" id="UIOP_002fIMAGE">
<div class="header">
<p>
Next: <a href="uiop.html#UIOP_002fLISP_002dBUILD" accesskey="n" rel="next">UIOP/LISP-BUILD</a>, Previous: <a href="uiop.html#UIOP_002fSTREAM" accesskey="p" rel="prev">UIOP/STREAM</a>, Up: <a href="uiop.html#Top" accesskey="u" rel="up">UIOP</a> &nbsp; [<a href="uiop.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<span id="UIOP_002fIMAGE-1"></span><h2 class="chapter">10 UIOP/IMAGE</h2>
<span id="Function-uiop_002fimage_003aargv0"></span><dl class="def">
<dt id="index-argv0"><span class="category">Function: </span><span><strong>argv0</strong><a href='uiop.html#index-argv0' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003aargv0"></span>
<p>On supported implementations (most that matter), or when invoked by a proper wrapper script,
return a string that for the name with which the program was invoked, i.e. argv[0] in <code>c</code>.
Otherwise, return <code>nil</code>.
</p></dd></dl>
<span id="Function-uiop_002fimage_003acall_002dimage_002ddump_002dhook"></span><dl class="def">
<dt id="index-call_002dimage_002ddump_002dhook"><span class="category">Function: </span><span><strong>call-image-dump-hook</strong><a href='uiop.html#index-call_002dimage_002ddump_002dhook' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003acall_002dimage_002ddump_002dhook"></span>
<p>Call the hook functions registered to be run before to dump an image
</p></dd></dl>
<span id="Function-uiop_002fimage_003acall_002dimage_002drestore_002dhook"></span><dl class="def">
<dt id="index-call_002dimage_002drestore_002dhook"><span class="category">Function: </span><span><strong>call-image-restore-hook</strong><a href='uiop.html#index-call_002dimage_002drestore_002dhook' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003acall_002dimage_002drestore_002dhook"></span>
<p>Call the hook functions registered to be run when restoring a dumped image
</p></dd></dl>
<span id="Function-uiop_002fimage_003acall_002dwith_002dfatal_002dcondition_002dhandler"></span><dl class="def">
<dt id="index-call_002dwith_002dfatal_002dcondition_002dhandler"><span class="category">Function: </span><span><strong>call-with-fatal-condition-handler</strong> <em>thunk</em><a href='uiop.html#index-call_002dwith_002dfatal_002dcondition_002dhandler' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003acall_002dwith_002dfatal_002dcondition_002dhandler"></span>
<p>Call <code>thunk</code> in a context where fatal conditions are appropriately handled
</p></dd></dl>
<span id="Function-uiop_002fimage_003acommand_002dline_002darguments"></span><dl class="def">
<dt id="index-command_002dline_002darguments"><span class="category">Function: </span><span><strong>command-line-arguments</strong> <em>&amp;optional arguments</em><a href='uiop.html#index-command_002dline_002darguments' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003acommand_002dline_002darguments"></span>
<p>Extract user arguments from command-line invocation of current process.
Assume the calling conventions of a generated script that uses <code>--</code>
if we are not called from a directly executable image.
</p></dd></dl>
<span id="Function-uiop_002fimage_003acreate_002dimage"></span><dl class="def">
<dt id="index-create_002dimage"><span class="category">Function: </span><span><strong>create-image</strong> <em>destination lisp-object-files &amp;key kind output-name prologue-code epilogue-code extra-object-files prelude postlude entry-point build-args no-uiop</em><a href='uiop.html#index-create_002dimage' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003acreate_002dimage"></span>
<p>On ECL, create an executable at pathname <code>destination</code> from the specified <code>object-files</code> and options
</p></dd></dl>
<span id="Function-uiop_002fimage_003adie"></span><dl class="def">
<dt id="index-die"><span class="category">Function: </span><span><strong>die</strong> <em>code format &amp;rest arguments</em><a href='uiop.html#index-die' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003adie"></span>
<p>Die in error with some error message
</p></dd></dl>
<span id="Function-uiop_002fimage_003adump_002dimage"></span><dl class="def">
<dt id="index-dump_002dimage"><span class="category">Function: </span><span><strong>dump-image</strong> <em>filename &amp;key output-name executable postlude dump-hook compression</em><a href='uiop.html#index-dump_002dimage' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003adump_002dimage"></span>
<p>Dump an image of the current Lisp environment at pathname <code>filename</code>, with various options.
</p>
<p>First, finalize the image, by evaluating the <code>postlude</code> as per <code>eval-input</code>, then calling each of
the functions in <code>dump-hook</code>, in reverse order of registration by <code>register-image-dump-hook</code>.
</p>
<p>If <code>executable</code> is true, create an standalone executable program that calls <code>restore-image</code> on startup.
</p>
<p>Pass various implementation-defined options, such as <code>prepend-symbols</code> and <code>purity</code> on CCL,
or <code>compression</code> on SBCL, and <code>application-type</code> on SBCL/Windows.
</p></dd></dl>
<span id="Function-uiop_002fimage_003afatal_002dcondition_002dp"></span><dl class="def">
<dt id="index-fatal_002dcondition_002dp"><span class="category">Function: </span><span><strong>fatal-condition-p</strong> <em>condition</em><a href='uiop.html#index-fatal_002dcondition_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003afatal_002dcondition_002dp"></span>
<p>Is the <code>condition</code> fatal?
</p></dd></dl>
<span id="Function-uiop_002fimage_003ahandle_002dfatal_002dcondition"></span><dl class="def">
<dt id="index-handle_002dfatal_002dcondition"><span class="category">Function: </span><span><strong>handle-fatal-condition</strong> <em>condition</em><a href='uiop.html#index-handle_002dfatal_002dcondition' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003ahandle_002dfatal_002dcondition"></span>
<p>Handle a fatal <code>condition:</code>
depending on whether <code>*lisp-interaction*</code> is set, enter debugger or die
</p></dd></dl>
<span id="Function-uiop_002fimage_003aprint_002dbacktrace"></span><dl class="def">
<dt id="index-print_002dbacktrace"><span class="category">Function: </span><span><strong>print-backtrace</strong> <em>&amp;rest keys &amp;key stream count condition</em><a href='uiop.html#index-print_002dbacktrace' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003aprint_002dbacktrace"></span>
<p>Print a backtrace
</p></dd></dl>
<span id="Function-uiop_002fimage_003aprint_002dcondition_002dbacktrace"></span><dl class="def">
<dt id="index-print_002dcondition_002dbacktrace"><span class="category">Function: </span><span><strong>print-condition-backtrace</strong> <em>condition &amp;key stream count</em><a href='uiop.html#index-print_002dcondition_002dbacktrace' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003aprint_002dcondition_002dbacktrace"></span>
<p>Print a condition after a backtrace triggered by that condition
</p></dd></dl>
<span id="Function-uiop_002fimage_003aquit"></span><dl class="def">
<dt id="index-quit"><span class="category">Function: </span><span><strong>quit</strong> <em>&amp;optional code finish-output</em><a href='uiop.html#index-quit' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003aquit"></span>
<p>Quits from the Lisp world, with the given exit status if provided.
This is designed to abstract away the implementation specific quit forms.
</p></dd></dl>
<span id="Function-uiop_002fimage_003araw_002dcommand_002dline_002darguments"></span><dl class="def">
<dt id="index-raw_002dcommand_002dline_002darguments"><span class="category">Function: </span><span><strong>raw-command-line-arguments</strong><a href='uiop.html#index-raw_002dcommand_002dline_002darguments' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003araw_002dcommand_002dline_002darguments"></span>
<p>Find what the actual command line for this process was.
</p></dd></dl>
<span id="Function-uiop_002fimage_003araw_002dprint_002dbacktrace"></span><dl class="def">
<dt id="index-raw_002dprint_002dbacktrace"><span class="category">Function: </span><span><strong>raw-print-backtrace</strong> <em>&amp;key stream count condition</em><a href='uiop.html#index-raw_002dprint_002dbacktrace' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003araw_002dprint_002dbacktrace"></span>
<p>Print a backtrace, directly accessing the implementation
</p></dd></dl>
<span id="Function-uiop_002fimage_003aregister_002dimage_002ddump_002dhook"></span><dl class="def">
<dt id="index-register_002dimage_002ddump_002dhook"><span class="category">Function: </span><span><strong>register-image-dump-hook</strong> <em>hook &amp;optional call-now-p</em><a href='uiop.html#index-register_002dimage_002ddump_002dhook' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003aregister_002dimage_002ddump_002dhook"></span>
<p>Register a the hook function to be run before to dump an image
</p></dd></dl>
<span id="Function-uiop_002fimage_003aregister_002dimage_002drestore_002dhook"></span><dl class="def">
<dt id="index-register_002dimage_002drestore_002dhook"><span class="category">Function: </span><span><strong>register-image-restore-hook</strong> <em>hook &amp;optional call-now-p</em><a href='uiop.html#index-register_002dimage_002drestore_002dhook' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003aregister_002dimage_002drestore_002dhook"></span>
<p>Regiter a hook function to be run when restoring a dumped image
</p></dd></dl>
<span id="Function-uiop_002fimage_003arestore_002dimage"></span><dl class="def">
<dt id="index-restore_002dimage"><span class="category">Function: </span><span><strong>restore-image</strong> <em>&amp;key lisp-interaction restore-hook prelude entry-point if-already-restored</em><a href='uiop.html#index-restore_002dimage' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003arestore_002dimage"></span>
<p>From a freshly restarted Lisp image, restore the saved Lisp environment
by setting appropriate variables, running various hooks, and calling any specified entry point.
</p>
<p>If the image has already been restored or is already being restored, as per <code>*image-restored-p*</code>,
call the <code>if-already-restored</code> error handler (by default, a continuable error), and do return
immediately to the surrounding restore process if allowed to continue.
</p>
<p>Then, comes the restore process itself:
First, call each function in the <code>restore-hook</code>,
in the order they were registered with <code>register-image-restore-hook</code>.
Second, evaluate the prelude, which is often Lisp text that is read,
as per <code>eval-input</code>.
Third, call the <code>entry-point</code> function, if any is specified, with no argument.
</p>
<p>The restore process happens in a <code>with-fatal-condition-handler</code>, so that if <code>lisp-interaction</code> is <code>nil</code>,
any unhandled error leads to a backtrace and an exit with an error status.
If <code>lisp-interaction</code> is <code>nil</code>, the process also exits when no error occurs:
if neither restart nor entry function is provided, the program will exit with status <code>0</code> (success);
if a function was provided, the program will exit after the function returns (if it returns),
with status <code>0</code> if and only if the primary return value of result is generalized boolean true,
and with status <code>1</code> if this value is <code>nil</code>.
</p>
<p>If <code>lisp-interaction</code> is true, unhandled errors will take you to the debugger, and the result
of the function will be returned rather than interpreted as a boolean designating an exit code.
</p></dd></dl>
<span id="Function-uiop_002fimage_003ashell_002dboolean_002dexit"></span><dl class="def">
<dt id="index-shell_002dboolean_002dexit"><span class="category">Function: </span><span><strong>shell-boolean-exit</strong> <em>x</em><a href='uiop.html#index-shell_002dboolean_002dexit' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003ashell_002dboolean_002dexit"></span>
<p>Quit with a return code that is <code>0</code> iff argument <code>x</code> is true
</p></dd></dl>
<span id="Macro-uiop_002fimage_003awith_002dfatal_002dcondition_002dhandler"></span><dl class="def">
<dt id="index-with_002dfatal_002dcondition_002dhandler"><span class="category">Macro: </span><span><strong>with-fatal-condition-handler</strong> <em>(&amp;optional) &amp;body body</em><a href='uiop.html#index-with_002dfatal_002dcondition_002dhandler' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003awith_002dfatal_002dcondition_002dhandler"></span>
<p>Execute <code>body</code> in a context where fatal conditions are appropriately handled
</p></dd></dl>
<span id="Variable-uiop_002fimage_003a_002acommand_002dline_002darguments_002a"></span><dl class="def">
<dt id="index-_002acommand_002dline_002darguments_002a"><span class="category">Variable: </span><span><strong>*command-line-arguments*</strong><a href='uiop.html#index-_002acommand_002dline_002darguments_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003a_002acommand_002dline_002darguments_002a"></span>
<p>Command-line arguments
</p></dd></dl>
<span id="Variable-uiop_002fimage_003a_002aimage_002ddump_002dhook_002a"></span><dl class="def">
<dt id="index-_002aimage_002ddump_002dhook_002a"><span class="category">Variable: </span><span><strong>*image-dump-hook*</strong><a href='uiop.html#index-_002aimage_002ddump_002dhook_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003a_002aimage_002ddump_002dhook_002a"></span>
<p>Functions to call (in order) when before an image is dumped
</p></dd></dl>
<span id="Variable-uiop_002fimage_003a_002aimage_002ddumped_002dp_002a"></span><dl class="def">
<dt id="index-_002aimage_002ddumped_002dp_002a"><span class="category">Variable: </span><span><strong>*image-dumped-p*</strong><a href='uiop.html#index-_002aimage_002ddumped_002dp_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003a_002aimage_002ddumped_002dp_002a"></span>
<p>Is this a dumped image? As a standalone executable?
</p></dd></dl>
<span id="Variable-uiop_002fimage_003a_002aimage_002dentry_002dpoint_002a"></span><dl class="def">
<dt id="index-_002aimage_002dentry_002dpoint_002a"><span class="category">Variable: </span><span><strong>*image-entry-point*</strong><a href='uiop.html#index-_002aimage_002dentry_002dpoint_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003a_002aimage_002dentry_002dpoint_002a"></span>
<p>a function with which to restart the dumped image when execution is restored from it.
</p></dd></dl>
<span id="Variable-uiop_002fimage_003a_002aimage_002dpostlude_002a"></span><dl class="def">
<dt id="index-_002aimage_002dpostlude_002a"><span class="category">Variable: </span><span><strong>*image-postlude*</strong><a href='uiop.html#index-_002aimage_002dpostlude_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003a_002aimage_002dpostlude_002a"></span>
<p>a form to evaluate, or string containing forms to read and evaluate
before the image dump hooks are called and before the image is dumped.
</p></dd></dl>
<span id="Variable-uiop_002fimage_003a_002aimage_002dprelude_002a"></span><dl class="def">
<dt id="index-_002aimage_002dprelude_002a"><span class="category">Variable: </span><span><strong>*image-prelude*</strong><a href='uiop.html#index-_002aimage_002dprelude_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003a_002aimage_002dprelude_002a"></span>
<p>a form to evaluate, or string containing forms to read and evaluate
when the image is restarted, but before the entry point is called.
</p></dd></dl>
<span id="Variable-uiop_002fimage_003a_002aimage_002drestore_002dhook_002a"></span><dl class="def">
<dt id="index-_002aimage_002drestore_002dhook_002a"><span class="category">Variable: </span><span><strong>*image-restore-hook*</strong><a href='uiop.html#index-_002aimage_002drestore_002dhook_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003a_002aimage_002drestore_002dhook_002a"></span>
<p>Functions to call (in reverse order) when the image is restored
</p></dd></dl>
<span id="Variable-uiop_002fimage_003a_002alisp_002dinteraction_002a"></span><dl class="def">
<dt id="index-_002alisp_002dinteraction_002a"><span class="category">Variable: </span><span><strong>*lisp-interaction*</strong><a href='uiop.html#index-_002alisp_002dinteraction_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fimage_003a_002alisp_002dinteraction_002a"></span>
<p>Is this an interactive Lisp environment, or is it batch processing?
</p></dd></dl>
<hr>
</div>
<div class="chapter" id="UIOP_002fLISP_002dBUILD">
<div class="header">
<p>
Next: <a href="uiop.html#UIOP_002fLAUNCH_002dPROGRAM" accesskey="n" rel="next">UIOP/LAUNCH-PROGRAM</a>, Previous: <a href="uiop.html#UIOP_002fIMAGE" accesskey="p" rel="prev">UIOP/IMAGE</a>, Up: <a href="uiop.html#Top" accesskey="u" rel="up">UIOP</a> &nbsp; [<a href="uiop.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<span id="UIOP_002fLISP_002dBUILD-1"></span><h2 class="chapter">11 UIOP/LISP-BUILD</h2>
<span id="Function-uiop_002flisp_002dbuild_003acall_002daround_002dhook"></span><dl class="def">
<dt id="index-call_002daround_002dhook"><span class="category">Function: </span><span><strong>call-around-hook</strong> <em>hook function</em><a href='uiop.html#index-call_002daround_002dhook' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003acall_002daround_002dhook"></span>
<p>Call a <code>hook</code> around the execution of <code>function</code>
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003acall_002dwith_002dmuffled_002dcompiler_002dconditions"></span><dl class="def">
<dt id="index-call_002dwith_002dmuffled_002dcompiler_002dconditions"><span class="category">Function: </span><span><strong>call-with-muffled-compiler-conditions</strong> <em>thunk</em><a href='uiop.html#index-call_002dwith_002dmuffled_002dcompiler_002dconditions' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003acall_002dwith_002dmuffled_002dcompiler_002dconditions"></span>
<p>Call given <code>thunk</code> in a context where uninteresting conditions and compiler conditions are muffled
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003acall_002dwith_002dmuffled_002dloader_002dconditions"></span><dl class="def">
<dt id="index-call_002dwith_002dmuffled_002dloader_002dconditions"><span class="category">Function: </span><span><strong>call-with-muffled-loader-conditions</strong> <em>thunk</em><a href='uiop.html#index-call_002dwith_002dmuffled_002dloader_002dconditions' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003acall_002dwith_002dmuffled_002dloader_002dconditions"></span>
<p>Call given <code>thunk</code> in a context where uninteresting conditions and loader conditions are muffled
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003acheck_002ddeferred_002dwarnings"></span><dl class="def">
<dt id="index-check_002ddeferred_002dwarnings"><span class="category">Function: </span><span><strong>check-deferred-warnings</strong> <em>files &amp;optional context-format context-arguments</em><a href='uiop.html#index-check_002ddeferred_002dwarnings' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003acheck_002ddeferred_002dwarnings"></span>
<p>Given a list of <code>files</code> containing deferred warnings saved by <code>call-with-saved-deferred-warnings</code>,
re-intern and raise any warnings that are still meaningful.
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003acheck_002dlisp_002dcompile_002dresults"></span><dl class="def">
<dt id="index-check_002dlisp_002dcompile_002dresults"><span class="category">Function: </span><span><strong>check-lisp-compile-results</strong> <em>output warnings-p failure-p &amp;optional context-format context-arguments</em><a href='uiop.html#index-check_002dlisp_002dcompile_002dresults' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003acheck_002dlisp_002dcompile_002dresults"></span>
<p>Given the results of <code>compile-file</code>, raise an error or warning as appropriate
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003acheck_002dlisp_002dcompile_002dwarnings"></span><dl class="def">
<dt id="index-check_002dlisp_002dcompile_002dwarnings"><span class="category">Function: </span><span><strong>check-lisp-compile-warnings</strong> <em>warnings-p failure-p &amp;optional context-format context-arguments</em><a href='uiop.html#index-check_002dlisp_002dcompile_002dwarnings' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003acheck_002dlisp_002dcompile_002dwarnings"></span>
<p>Given the warnings or failures as resulted from <code>compile-file</code> or checking deferred warnings,
raise an error or warning as appropriate
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003acombine_002dfasls"></span><dl class="def">
<dt id="index-combine_002dfasls"><span class="category">Function: </span><span><strong>combine-fasls</strong> <em>inputs output</em><a href='uiop.html#index-combine_002dfasls' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003acombine_002dfasls"></span>
<p>Combine a list of FASLs <code>inputs</code> into a single FASL <code>output</code>
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003acompile_002dfile_002dpathname_002a"></span><dl class="def">
<dt id="index-compile_002dfile_002dpathname_002a"><span class="category">Function: </span><span><strong>compile-file-pathname*</strong> <em>input-file &amp;rest keys &amp;key output-file &amp;allow-other-keys </em><a href='uiop.html#index-compile_002dfile_002dpathname_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003acompile_002dfile_002dpathname_002a"></span>
<p>Variant of <code>compile-file-pathname</code> that works well with <code>compile-file*</code>
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003acompile_002dfile_002a"></span><dl class="def">
<dt id="index-compile_002dfile_002a"><span class="category">Function: </span><span><strong>compile-file*</strong> <em>input-file &amp;rest keys &amp;key compile-check output-file warnings-file emit-cfasl &amp;allow-other-keys </em><a href='uiop.html#index-compile_002dfile_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003acompile_002dfile_002a"></span>
<p>This function provides a portable wrapper around <code>compile-file</code>.
It ensures that the <code>output-file</code> value is only returned and
the file only actually created if the compilation was successful,
even though your implementation may not do that. It also checks an optional
user-provided consistency function <code>compile-check</code> to determine success;
it will call this function if not <code>nil</code> at the end of the compilation
with the arguments sent to <code>compile-file*</code>, except with <code>:output-file</code> <code>tmp-file</code>
where <code>tmp-file</code> is the name of a temporary output-file.
It also checks two flags (with legacy british spelling from <code>asdf1</code>),
<code>*compile-file-failure-behaviour*</code> and <code>*compile-file-warnings-behaviour*</code>
with appropriate implementation-dependent defaults,
and if a failure (respectively warnings) are reported by <code>compile-file</code>,
it will consider that an error unless the respective behaviour flag
is one of <code>:success</code> <code>:warn</code> <code>:ignore</code>.
If <code>warnings-file</code> is defined, deferred warnings are saved to that file.
On ECL or MKCL, it creates both the linkable object and loadable fasl files.
On implementations that erroneously do not recognize standard keyword arguments,
it will filter them appropriately.
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003acompile_002dfile_002dtype"></span><dl class="def">
<dt id="index-compile_002dfile_002dtype"><span class="category">Function: </span><span><strong>compile-file-type</strong> <em>&amp;rest keys</em><a href='uiop.html#index-compile_002dfile_002dtype' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003acompile_002dfile_002dtype"></span>
<p>pathname <code>type</code> for lisp FASt Loading files
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003acurrent_002dlisp_002dfile_002dpathname"></span><dl class="def">
<dt id="index-current_002dlisp_002dfile_002dpathname"><span class="category">Function: </span><span><strong>current-lisp-file-pathname</strong><a href='uiop.html#index-current_002dlisp_002dfile_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003acurrent_002dlisp_002dfile_002dpathname"></span>
<p>Portably return the <code>pathname</code> of the current Lisp source file being compiled or loaded
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003adisable_002ddeferred_002dwarnings_002dcheck"></span><dl class="def">
<dt id="index-disable_002ddeferred_002dwarnings_002dcheck"><span class="category">Function: </span><span><strong>disable-deferred-warnings-check</strong><a href='uiop.html#index-disable_002ddeferred_002dwarnings_002dcheck' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003adisable_002ddeferred_002dwarnings_002dcheck"></span>
<p>Disable the saving of deferred warnings
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003aenable_002ddeferred_002dwarnings_002dcheck"></span><dl class="def">
<dt id="index-enable_002ddeferred_002dwarnings_002dcheck"><span class="category">Function: </span><span><strong>enable-deferred-warnings-check</strong><a href='uiop.html#index-enable_002ddeferred_002dwarnings_002dcheck' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003aenable_002ddeferred_002dwarnings_002dcheck"></span>
<p>Enable the saving of deferred warnings
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003aget_002doptimization_002dsettings"></span><dl class="def">
<dt id="index-get_002doptimization_002dsettings"><span class="category">Function: </span><span><strong>get-optimization-settings</strong><a href='uiop.html#index-get_002doptimization_002dsettings' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003aget_002doptimization_002dsettings"></span>
<p>Get current compiler optimization settings, ready to <code>proclaim</code> again
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003alispize_002dpathname"></span><dl class="def">
<dt id="index-lispize_002dpathname"><span class="category">Function: </span><span><strong>lispize-pathname</strong> <em>input-file</em><a href='uiop.html#index-lispize_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003alispize_002dpathname"></span>
<p>From a <code>input-file</code> pathname, return a corresponding .lisp source pathname
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003aload_002dfrom_002dstring"></span><dl class="def">
<dt id="index-load_002dfrom_002dstring"><span class="category">Function: </span><span><strong>load-from-string</strong> <em>string</em><a href='uiop.html#index-load_002dfrom_002dstring' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003aload_002dfrom_002dstring"></span>
<p>Portably read and evaluate forms from a <code>string</code>.
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003aload_002dpathname"></span><dl class="def">
<dt id="index-load_002dpathname"><span class="category">Function: </span><span><strong>load-pathname</strong><a href='uiop.html#index-load_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003aload_002dpathname"></span>
<p>Portably return the <code>load-pathname</code> of the current source file or fasl.
May return a relative pathname.
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003aload_002a"></span><dl class="def">
<dt id="index-load_002a"><span class="category">Function: </span><span><strong>load*</strong> <em>x &amp;rest keys &amp;key &amp;allow-other-keys </em><a href='uiop.html#index-load_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003aload_002a"></span>
<p>Portable wrapper around <code>load</code> that properly handles loading from a stream.
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003aproclaim_002doptimization_002dsettings"></span><dl class="def">
<dt id="index-proclaim_002doptimization_002dsettings"><span class="category">Function: </span><span><strong>proclaim-optimization-settings</strong><a href='uiop.html#index-proclaim_002doptimization_002dsettings' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003aproclaim_002doptimization_002dsettings"></span>
<p>Proclaim the optimization settings in <code>*optimization-settings*</code>
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003areify_002ddeferred_002dwarnings"></span><dl class="def">
<dt id="index-reify_002ddeferred_002dwarnings"><span class="category">Function: </span><span><strong>reify-deferred-warnings</strong><a href='uiop.html#index-reify_002ddeferred_002dwarnings' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003areify_002ddeferred_002dwarnings"></span>
<p>return a portable S-expression, portably readable and writeable in any Common Lisp implementation
using <code>read</code> within a <code>with-safe-io-syntax</code>, that represents the warnings currently deferred by
<code>with-compilation-unit</code>. One of three functions required for deferred-warnings support in ASDF.
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003areify_002dsimple_002dsexp"></span><dl class="def">
<dt id="index-reify_002dsimple_002dsexp"><span class="category">Function: </span><span><strong>reify-simple-sexp</strong> <em>sexp</em><a href='uiop.html#index-reify_002dsimple_002dsexp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003areify_002dsimple_002dsexp"></span>
<p>Given a simple <code>sexp</code>, return a representation of it as a portable <code>sexp</code>.
Simple means made of symbols, numbers, characters, simple-strings, pathnames, cons cells.
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003areset_002ddeferred_002dwarnings"></span><dl class="def">
<dt id="index-reset_002ddeferred_002dwarnings"><span class="category">Function: </span><span><strong>reset-deferred-warnings</strong><a href='uiop.html#index-reset_002ddeferred_002dwarnings' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003areset_002ddeferred_002dwarnings"></span>
<p>Reset the set of deferred warnings to be handled at the end of the current <code>with-compilation-unit</code>.
One of three functions required for deferred-warnings support in ASDF.
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003asave_002ddeferred_002dwarnings"></span><dl class="def">
<dt id="index-save_002ddeferred_002dwarnings"><span class="category">Function: </span><span><strong>save-deferred-warnings</strong> <em>warnings-file</em><a href='uiop.html#index-save_002ddeferred_002dwarnings' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003asave_002ddeferred_002dwarnings"></span>
<p>Save forward reference conditions so they may be issued at a latter time,
possibly in a different process.
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003aunreify_002ddeferred_002dwarnings"></span><dl class="def">
<dt id="index-unreify_002ddeferred_002dwarnings"><span class="category">Function: </span><span><strong>unreify-deferred-warnings</strong> <em>reified-deferred-warnings</em><a href='uiop.html#index-unreify_002ddeferred_002dwarnings' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003aunreify_002ddeferred_002dwarnings"></span>
<p>given a S-expression created by <code>reify-deferred-warnings</code>, reinstantiate the corresponding
deferred warnings as to be handled at the end of the current <code>with-compilation-unit</code>.
Handle any warning that has been resolved already,
such as an undefined function that has been defined since.
One of three functions required for deferred-warnings support in ASDF.
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003aunreify_002dsimple_002dsexp"></span><dl class="def">
<dt id="index-unreify_002dsimple_002dsexp"><span class="category">Function: </span><span><strong>unreify-simple-sexp</strong> <em>sexp</em><a href='uiop.html#index-unreify_002dsimple_002dsexp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003aunreify_002dsimple_002dsexp"></span>
<p>Given the portable output of <code>reify-simple-sexp</code>, return the simple <code>sexp</code> it represents
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003awarnings_002dfile_002dp"></span><dl class="def">
<dt id="index-warnings_002dfile_002dp"><span class="category">Function: </span><span><strong>warnings-file-p</strong> <em>file &amp;optional implementation-type</em><a href='uiop.html#index-warnings_002dfile_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003awarnings_002dfile_002dp"></span>
<p>Is <code>file</code> a saved warnings file for the given <code>implementation-type</code>?
If that given type is <code>nil</code>, use the currently configured <code>*warnings-file-type*</code> instead.
</p></dd></dl>
<span id="Function-uiop_002flisp_002dbuild_003awarnings_002dfile_002dtype"></span><dl class="def">
<dt id="index-warnings_002dfile_002dtype"><span class="category">Function: </span><span><strong>warnings-file-type</strong> <em>&amp;optional implementation-type</em><a href='uiop.html#index-warnings_002dfile_002dtype' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003awarnings_002dfile_002dtype"></span>
<p>The pathname type for warnings files on given <code>implementation-type</code>,
where <code>nil</code> designates the current one
</p></dd></dl>
<span id="Macro-uiop_002flisp_002dbuild_003awith_002dmuffled_002dcompiler_002dconditions"></span><dl class="def">
<dt id="index-with_002dmuffled_002dcompiler_002dconditions"><span class="category">Macro: </span><span><strong>with-muffled-compiler-conditions</strong> <em>(&amp;optional) &amp;body body</em><a href='uiop.html#index-with_002dmuffled_002dcompiler_002dconditions' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003awith_002dmuffled_002dcompiler_002dconditions"></span>
<p>Trivial syntax for <code>call-with-muffled-compiler-conditions</code>
</p></dd></dl>
<span id="Macro-uiop_002flisp_002dbuild_003awith_002dmuffled_002dloader_002dconditions"></span><dl class="def">
<dt id="index-with_002dmuffled_002dloader_002dconditions"><span class="category">Macro: </span><span><strong>with-muffled-loader-conditions</strong> <em>(&amp;optional) &amp;body body</em><a href='uiop.html#index-with_002dmuffled_002dloader_002dconditions' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003awith_002dmuffled_002dloader_002dconditions"></span>
<p>Trivial syntax for <code>call-with-muffled-loader-conditions</code>
</p></dd></dl>
<span id="Macro-uiop_002flisp_002dbuild_003awith_002dsaved_002ddeferred_002dwarnings"></span><dl class="def">
<dt id="index-with_002dsaved_002ddeferred_002dwarnings"><span class="category">Macro: </span><span><strong>with-saved-deferred-warnings</strong> <em>(warnings-file &amp;key source-namestring) &amp;body body</em><a href='uiop.html#index-with_002dsaved_002ddeferred_002dwarnings' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003awith_002dsaved_002ddeferred_002dwarnings"></span>
<p>Trivial syntax for <code>call-with-saved-deferred-warnings</code>
</p></dd></dl>
<span id="Variable-uiop_002flisp_002dbuild_003a_002abase_002dbuild_002ddirectory_002a"></span><dl class="def">
<dt id="index-_002abase_002dbuild_002ddirectory_002a"><span class="category">Variable: </span><span><strong>*base-build-directory*</strong><a href='uiop.html#index-_002abase_002dbuild_002ddirectory_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003a_002abase_002dbuild_002ddirectory_002a"></span>
<p>When set to a non-null value, it should be an absolute directory pathname,
which will serve as the <code>*default-pathname-defaults*</code> around a <code>compile-file</code>,
what more while the input-file is shortened if possible to <code>enough-pathname</code> relative to it.
This can help you produce more deterministic output for FASLs.
</p></dd></dl>
<span id="Variable-uiop_002flisp_002dbuild_003a_002acompile_002dcheck_002a"></span><dl class="def">
<dt id="index-_002acompile_002dcheck_002a"><span class="category">Variable: </span><span><strong>*compile-check*</strong><a href='uiop.html#index-_002acompile_002dcheck_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003a_002acompile_002dcheck_002a"></span>
<p>A hook for user-defined compile-time invariants
</p></dd></dl>
<span id="Variable-uiop_002flisp_002dbuild_003a_002acompile_002dfile_002dfailure_002dbehaviour_002a"></span><dl class="def">
<dt id="index-_002acompile_002dfile_002dfailure_002dbehaviour_002a"><span class="category">Variable: </span><span><strong>*compile-file-failure-behaviour*</strong><a href='uiop.html#index-_002acompile_002dfile_002dfailure_002dbehaviour_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003a_002acompile_002dfile_002dfailure_002dbehaviour_002a"></span>
<p>How should ASDF react if it encounters a failure (per the ANSI spec of <code>compile-file</code>)
when compiling a file, which includes any non-style-warning warning.
Valid values are :error, :warn, and :ignore.
Note that ASDF <code>always</code> raises an error if it fails to create an output file when compiling.
</p></dd></dl>
<span id="Variable-uiop_002flisp_002dbuild_003a_002acompile_002dfile_002dwarnings_002dbehaviour_002a"></span><dl class="def">
<dt id="index-_002acompile_002dfile_002dwarnings_002dbehaviour_002a"><span class="category">Variable: </span><span><strong>*compile-file-warnings-behaviour*</strong><a href='uiop.html#index-_002acompile_002dfile_002dwarnings_002dbehaviour_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003a_002acompile_002dfile_002dwarnings_002dbehaviour_002a"></span>
<p>How should ASDF react if it encounters a warning when compiling a file?
Valid values are :error, :warn, and :ignore.
</p></dd></dl>
<span id="Variable-uiop_002flisp_002dbuild_003a_002aoptimization_002dsettings_002a"></span><dl class="def">
<dt id="index-_002aoptimization_002dsettings_002a"><span class="category">Variable: </span><span><strong>*optimization-settings*</strong><a href='uiop.html#index-_002aoptimization_002dsettings_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003a_002aoptimization_002dsettings_002a"></span>
<p>Optimization settings to be used by <code>proclaim-optimization-settings</code>
</p></dd></dl>
<span id="Variable-uiop_002flisp_002dbuild_003a_002aoutput_002dtranslation_002dfunction_002a"></span><dl class="def">
<dt id="index-_002aoutput_002dtranslation_002dfunction_002a-1"><span class="category">Variable: </span><span><strong>*output-translation-function*</strong><a href='uiop.html#index-_002aoutput_002dtranslation_002dfunction_002a-1' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003a_002aoutput_002dtranslation_002dfunction_002a"></span>
<p>Hook for output translations.
</p>
<p>This function needs to be idempotent, so that actions can work
whether their inputs were translated or not,
which they will be if we are composing operations. e.g. if some
create-lisp-op creates a lisp file from some higher-level input,
you need to still be able to use compile-op on that lisp file.
</p></dd></dl>
<span id="Variable-uiop_002flisp_002dbuild_003a_002aprevious_002doptimization_002dsettings_002a"></span><dl class="def">
<dt id="index-_002aprevious_002doptimization_002dsettings_002a"><span class="category">Variable: </span><span><strong>*previous-optimization-settings*</strong><a href='uiop.html#index-_002aprevious_002doptimization_002dsettings_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003a_002aprevious_002doptimization_002dsettings_002a"></span>
<p>Optimization settings saved by <code>proclaim-optimization-settings</code>
</p></dd></dl>
<span id="Variable-uiop_002flisp_002dbuild_003a_002auninteresting_002dcompiler_002dconditions_002a"></span><dl class="def">
<dt id="index-_002auninteresting_002dcompiler_002dconditions_002a"><span class="category">Variable: </span><span><strong>*uninteresting-compiler-conditions*</strong><a href='uiop.html#index-_002auninteresting_002dcompiler_002dconditions_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003a_002auninteresting_002dcompiler_002dconditions_002a"></span>
<p>Additional conditions that may be skipped while compiling Lisp code.
</p></dd></dl>
<span id="Variable-uiop_002flisp_002dbuild_003a_002auninteresting_002dconditions_002a"></span><dl class="def">
<dt id="index-_002auninteresting_002dconditions_002a"><span class="category">Variable: </span><span><strong>*uninteresting-conditions*</strong><a href='uiop.html#index-_002auninteresting_002dconditions_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003a_002auninteresting_002dconditions_002a"></span>
<p>Conditions that may be skipped while compiling or loading Lisp code.
</p></dd></dl>
<span id="Variable-uiop_002flisp_002dbuild_003a_002auninteresting_002dloader_002dconditions_002a"></span><dl class="def">
<dt id="index-_002auninteresting_002dloader_002dconditions_002a"><span class="category">Variable: </span><span><strong>*uninteresting-loader-conditions*</strong><a href='uiop.html#index-_002auninteresting_002dloader_002dconditions_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003a_002auninteresting_002dloader_002dconditions_002a"></span>
<p>Additional conditions that may be skipped while loading Lisp code.
</p></dd></dl>
<span id="Variable-uiop_002flisp_002dbuild_003a_002ausual_002duninteresting_002dconditions_002a"></span><dl class="def">
<dt id="index-_002ausual_002duninteresting_002dconditions_002a"><span class="category">Variable: </span><span><strong>*usual-uninteresting-conditions*</strong><a href='uiop.html#index-_002ausual_002duninteresting_002dconditions_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003a_002ausual_002duninteresting_002dconditions_002a"></span>
<p>A suggested value to which to set or bind *uninteresting-conditions*.
</p></dd></dl>
<span id="Variable-uiop_002flisp_002dbuild_003a_002awarnings_002dfile_002dtype_002a"></span><dl class="def">
<dt id="index-_002awarnings_002dfile_002dtype_002a"><span class="category">Variable: </span><span><strong>*warnings-file-type*</strong><a href='uiop.html#index-_002awarnings_002dfile_002dtype_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flisp_002dbuild_003a_002awarnings_002dfile_002dtype_002a"></span>
<p>Pathname type for warnings files, or <code>nil</code> if disabled
</p></dd></dl>
<hr>
</div>
<div class="chapter" id="UIOP_002fLAUNCH_002dPROGRAM">
<div class="header">
<p>
Next: <a href="uiop.html#UIOP_002fRUN_002dPROGRAM" accesskey="n" rel="next">UIOP/RUN-PROGRAM</a>, Previous: <a href="uiop.html#UIOP_002fLISP_002dBUILD" accesskey="p" rel="prev">UIOP/LISP-BUILD</a>, Up: <a href="uiop.html#Top" accesskey="u" rel="up">UIOP</a> &nbsp; [<a href="uiop.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<span id="UIOP_002fLAUNCH_002dPROGRAM-1"></span><h2 class="chapter">12 UIOP/LAUNCH-PROGRAM</h2>
<p><code>uiop/launch-program</code> semi-portably launches a program as an
asynchronous external subprocess. Available functionality may depend
on the underlying implementation.
</p>
<span id="Class-uiop_002flaunch_002dprogram_003aprocess_002dinfo"></span><dl class="def">
<dt id="index-process_002dinfo"><span class="category">Class: </span><span><strong>process-info</strong><a href='uiop.html#index-process_002dinfo' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flaunch_002dprogram_003aprocess_002dinfo"></span>
<p>Class precedence list: <code>process-info, standard-object, t</code>
</p>
<p>This class should be treated as opaque by programmers, except for the
exported <code>process-info-*</code> functions. It should never be directly instantiated by
<code>make-instance</code>. Primarily, it is being made available to enable type-checking.
</p></dd></dl>
<span id="Function-uiop_002flaunch_002dprogram_003aclose_002dstreams"></span><dl class="def">
<dt id="index-close_002dstreams"><span class="category">Function: </span><span><strong>close-streams</strong> <em>process-info</em><a href='uiop.html#index-close_002dstreams' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flaunch_002dprogram_003aclose_002dstreams"></span>
<p>Close any stream that the process might own. Needs to be run
whenever streams were requested by passing :stream to :input, :output,
or :error-output.
</p></dd></dl>
<span id="Function-uiop_002flaunch_002dprogram_003aeasy_002dsh_002dcharacter_002dp"></span><dl class="def">
<dt id="index-easy_002dsh_002dcharacter_002dp"><span class="category">Function: </span><span><strong>easy-sh-character-p</strong> <em>x</em><a href='uiop.html#index-easy_002dsh_002dcharacter_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flaunch_002dprogram_003aeasy_002dsh_002dcharacter_002dp"></span>
<p>Is <code>x</code> an &quot;easy&quot; character that does not require quoting by the shell?
</p></dd></dl>
<span id="Function-uiop_002flaunch_002dprogram_003aescape_002dcommand"></span><dl class="def">
<dt id="index-escape_002dcommand"><span class="category">Function: </span><span><strong>escape-command</strong> <em>command &amp;optional s escaper</em><a href='uiop.html#index-escape_002dcommand' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flaunch_002dprogram_003aescape_002dcommand"></span>
<p>Given a <code>command</code> as a list of tokens, return a string of the
spaced, escaped tokens, using <code>escaper</code> to escape.
</p></dd></dl>
<span id="Function-uiop_002flaunch_002dprogram_003aescape_002dsh_002dcommand"></span><dl class="def">
<dt id="index-escape_002dsh_002dcommand"><span class="category">Function: </span><span><strong>escape-sh-command</strong> <em>command &amp;optional s</em><a href='uiop.html#index-escape_002dsh_002dcommand' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flaunch_002dprogram_003aescape_002dsh_002dcommand"></span>
<p>Escape a list of command-line arguments into a string suitable for parsing
by /bin/sh in POSIX
</p></dd></dl>
<span id="Function-uiop_002flaunch_002dprogram_003aescape_002dsh_002dtoken"></span><dl class="def">
<dt id="index-escape_002dsh_002dtoken"><span class="category">Function: </span><span><strong>escape-sh-token</strong> <em>token &amp;optional s</em><a href='uiop.html#index-escape_002dsh_002dtoken' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flaunch_002dprogram_003aescape_002dsh_002dtoken"></span>
<p>Escape a string <code>token</code> within double-quotes if needed
for use within a POSIX Bourne shell, outputing to <code>s</code>.
</p></dd></dl>
<span id="Function-uiop_002flaunch_002dprogram_003aescape_002dshell_002dcommand"></span><dl class="def">
<dt id="index-escape_002dshell_002dcommand"><span class="category">Function: </span><span><strong>escape-shell-command</strong> <em>command &amp;optional stream</em><a href='uiop.html#index-escape_002dshell_002dcommand' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flaunch_002dprogram_003aescape_002dshell_002dcommand"></span>
<p>Escape a command for the current operating system&rsquo;s shell
</p></dd></dl>
<span id="Function-uiop_002flaunch_002dprogram_003aescape_002dshell_002dtoken"></span><dl class="def">
<dt id="index-escape_002dshell_002dtoken"><span class="category">Function: </span><span><strong>escape-shell-token</strong> <em>token &amp;optional s</em><a href='uiop.html#index-escape_002dshell_002dtoken' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flaunch_002dprogram_003aescape_002dshell_002dtoken"></span>
<p>Escape a token for the current operating system shell
</p></dd></dl>
<span id="Function-uiop_002flaunch_002dprogram_003aescape_002dtoken"></span><dl class="def">
<dt id="index-escape_002dtoken"><span class="category">Function: </span><span><strong>escape-token</strong> <em>token &amp;key stream quote good-chars bad-chars escaper</em><a href='uiop.html#index-escape_002dtoken' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flaunch_002dprogram_003aescape_002dtoken"></span>
<p>Call the <code>escaper</code> function on <code>token</code> string if it needs escaping as per
<code>requires-escaping-p</code> using <code>good-chars</code> and <code>bad-chars</code>, otherwise output <code>token</code>,
using <code>stream</code> as output (or returning result as a string if <code>nil</code>)
</p></dd></dl>
<span id="Function-uiop_002flaunch_002dprogram_003aescape_002dwindows_002dcommand"></span><dl class="def">
<dt id="index-escape_002dwindows_002dcommand"><span class="category">Function: </span><span><strong>escape-windows-command</strong> <em>command &amp;optional s</em><a href='uiop.html#index-escape_002dwindows_002dcommand' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flaunch_002dprogram_003aescape_002dwindows_002dcommand"></span>
<p>Escape a list of command-line arguments into a string suitable for parsing
by CommandLineToArgv in <code>ms</code> Windows
</p></dd></dl>
<span id="Function-uiop_002flaunch_002dprogram_003aescape_002dwindows_002dtoken"></span><dl class="def">
<dt id="index-escape_002dwindows_002dtoken"><span class="category">Function: </span><span><strong>escape-windows-token</strong> <em>token &amp;optional s</em><a href='uiop.html#index-escape_002dwindows_002dtoken' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flaunch_002dprogram_003aescape_002dwindows_002dtoken"></span>
<p>Escape a string <code>token</code> within double-quotes if needed
for use within a <code>ms</code> Windows command-line, outputing to <code>s</code>.
</p></dd></dl>
<span id="Function-uiop_002flaunch_002dprogram_003alaunch_002dprogram"></span><dl class="def">
<dt id="index-launch_002dprogram"><span class="category">Function: </span><span><strong>launch-program</strong> <em>command &amp;rest keys &amp;key input if-input-does-not-exist output if-output-exists error-output if-error-output-exists element-type external-format directory &amp;allow-other-keys </em><a href='uiop.html#index-launch_002dprogram' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flaunch_002dprogram_003alaunch_002dprogram"></span>
<p>Launch program specified by <code>command</code>,
either a list of strings specifying a program and list of arguments,
or a string specifying a shell command (/bin/sh on Unix, <code>cmd</code>.<code>exe</code> on
Windows) _asynchronously_.
</p>
<p>If <code>output</code> is a pathname, a string designating a pathname, or <code>nil</code> (the
default) designating the null device, the file at that path is used as
output.
If it&rsquo;s <code>:interactive</code>, output is inherited from the current process;
beware that this may be different from your <code>*standard-output*</code>, and
under <code>slime</code> will be on your *inferior-lisp* buffer. If it&rsquo;s <code>t</code>, output
goes to your current <code>*standard-output*</code> stream. If it&rsquo;s <code>:stream</code>, a new
stream will be made available that can be accessed via
<code>process-info-output</code> and read from. Otherwise, <code>output</code> should be a value
that the underlying lisp implementation knows how to handle.
</p>
<p><code>if-output-exists</code>, which is only meaningful if <code>output</code> is a string or a
pathname, can take the values <code>:error</code>, <code>:append</code>, and <code>:supersede</code> (the
default). The meaning of these values and their effect on the case
where <code>output</code> does not exist, is analogous to the <code>if-exists</code> parameter
to <code>open</code> with <code>:direction</code> <code>:output</code>.
</p>
<p><code>error-output</code> is similar to <code>output</code>. <code>t</code> designates the <code>*error-output*</code>,
<code>:output</code> means redirecting the error output to the output stream,
and <code>:stream</code> causes a stream to be made available via
<code>process-info-error-output</code>.
</p>
<p><code>if-error-output-exists</code> is similar to <code>if-output-exist</code>, except that it
affects <code>error-output</code> rather than <code>output</code>.
</p>
<p><code>input</code> is similar to <code>output</code>, except that <code>t</code> designates the
<code>*standard-input*</code> and a stream requested through the <code>:stream</code> keyword
would be available through <code>process-info-input</code>.
</p>
<p><code>if-input-does-not-exist</code>, which is only meaningful if <code>input</code> is a string
or a pathname, can take the values <code>:create</code> and <code>:error</code> (the
default). The meaning of these values is analogous to the
<code>if-does-not-exist</code> parameter to <code>open</code> with <code>:direction</code> <code>:input</code>.
</p>
<p><code>element-type</code> and <code>external-format</code> are passed on to your Lisp
implementation, when applicable, for creation of the output stream.
</p>
<p><code>launch-program</code> returns a <code>process-info</code> object.
</p>
<p><code>launch-program</code> currently does not smooth over all the differences between
implementations. Of particular note is when streams are provided for <code>output</code> or
<code>error-output</code>. Some implementations don&rsquo;t support this at all, some support only
certain subclasses of streams, and some support any arbitrary
stream. Additionally, the implementations that support streams may have
differing behavior on how those streams are filled with data. If data is not
periodically read from the child process and sent to the stream, the child
could block because its output buffers are full.
</p></dd></dl>
<span id="Function-uiop_002flaunch_002dprogram_003aprocess_002dalive_002dp"></span><dl class="def">
<dt id="index-process_002dalive_002dp"><span class="category">Function: </span><span><strong>process-alive-p</strong> <em>process-info</em><a href='uiop.html#index-process_002dalive_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flaunch_002dprogram_003aprocess_002dalive_002dp"></span>
<p>Check if a process has yet to exit.
</p></dd></dl>
<span id="Function-uiop_002flaunch_002dprogram_003aterminate_002dprocess"></span><dl class="def">
<dt id="index-terminate_002dprocess"><span class="category">Function: </span><span><strong>terminate-process</strong> <em>process-info &amp;key urgent</em><a href='uiop.html#index-terminate_002dprocess' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flaunch_002dprogram_003aterminate_002dprocess"></span>
<p>Cause the process to exit. To that end, the process may or may
not be sent a signal, which it will find harder (or even impossible)
to ignore if <code>urgent</code> is <code>t</code>. On some platforms, it may also be subject to
race conditions.
</p></dd></dl>
<span id="Function-uiop_002flaunch_002dprogram_003await_002dprocess"></span><dl class="def">
<dt id="index-wait_002dprocess"><span class="category">Function: </span><span><strong>wait-process</strong> <em>process-info</em><a href='uiop.html#index-wait_002dprocess' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002flaunch_002dprogram_003await_002dprocess"></span>
<p>Wait for the process to terminate, if it is still running.
Otherwise, return immediately. An exit code (a number) will be
returned, with <code>0</code> indicating success, and anything else indicating
failure. If the process exits after receiving a signal, the exit code
will be the sum of <code>128</code> and the (positive) numeric signal code. A second
value may be returned in this case: the numeric signal code itself.
Any asynchronously spawned process requires this function to be run
before it is garbage-collected in order to free up resources that
might otherwise be irrevocably lost.
</p></dd></dl>
<hr>
</div>
<div class="chapter" id="UIOP_002fRUN_002dPROGRAM">
<div class="header">
<p>
Next: <a href="uiop.html#UIOP_002fCONFIGURATION" accesskey="n" rel="next">UIOP/CONFIGURATION</a>, Previous: <a href="uiop.html#UIOP_002fLAUNCH_002dPROGRAM" accesskey="p" rel="prev">UIOP/LAUNCH-PROGRAM</a>, Up: <a href="uiop.html#Top" accesskey="u" rel="up">UIOP</a> &nbsp; [<a href="uiop.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<span id="UIOP_002fRUN_002dPROGRAM-1"></span><h2 class="chapter">13 UIOP/RUN-PROGRAM</h2>
<p><code>uiop/run-program</code> fully portably runs a program as a synchronous
external subprocess.
</p>
<span id="Function-uiop_002frun_002dprogram_003arun_002dprogram"></span><dl class="def">
<dt id="index-run_002dprogram"><span class="category">Function: </span><span><strong>run-program</strong> <em>command &amp;rest keys &amp;key ignore-error-status force-shell input if-input-does-not-exist output if-output-exists error-output if-error-output-exists element-type external-format &amp;allow-other-keys </em><a href='uiop.html#index-run_002dprogram' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002frun_002dprogram_003arun_002dprogram"></span>
<p>Run program specified by <code>command</code>,
either a list of strings specifying a program and list of arguments,
or a string specifying a shell command (/bin/sh on Unix, <code>cmd</code>.<code>exe</code> on Windows);
_synchronously_ process its output as specified and return the processing results
when the program and its output processing are complete.
</p>
<p>Always call a shell (rather than directly execute the command when possible)
if <code>force-shell</code> is specified. Similarly, never call a shell if <code>force-shell</code> is
specified to be <code>nil</code>.
</p>
<p>Signal a continuable <code>subprocess-error</code> if the process wasn&rsquo;t successful (exit-code <code>0</code>),
unless <code>ignore-error-status</code> is specified.
</p>
<p>If <code>output</code> is a pathname, a string designating a pathname, or <code>nil</code> (the default)
designating the null device, the file at that path is used as output.
If it&rsquo;s <code>:interactive</code>, output is inherited from the current process;
beware that this may be different from your <code>*standard-output*</code>,
and under <code>slime</code> will be on your *inferior-lisp* buffer.
If it&rsquo;s <code>t</code>, output goes to your current <code>*standard-output*</code> stream.
Otherwise, <code>output</code> should be a value that is a suitable first argument to
<code>slurp-input-stream</code> (qv.), or a list of such a value and keyword arguments.
In this case, <code>run-program</code> will create a temporary stream for the program output;
the program output, in that stream, will be processed by a call to <code>slurp-input-stream</code>,
using <code>output</code> as the first argument (or the first element of <code>output</code>, and the rest as keywords).
The primary value resulting from that call (or <code>nil</code> if no call was needed)
will be the first value returned by <code>run-program</code>.
<code>e</code>.g., using <code>:output</code> <code>:string</code> will have it return the entire output stream as a string.
And using <code>:output</code> &rsquo;(<code>:string</code> <code>:stripped</code> <code>t</code>) will have it return the same string
stripped of any ending newline.
</p>
<p><code>if-output-exists</code>, which is only meaningful if <code>output</code> is a string or a
pathname, can take the values <code>:error</code>, <code>:append</code>, and <code>:supersede</code> (the
default). The meaning of these values and their effect on the case
where <code>output</code> does not exist, is analogous to the <code>if-exists</code> parameter
to <code>open</code> with <code>:direction</code> <code>:output</code>.
</p>
<p><code>error-output</code> is similar to <code>output</code>, except that the resulting value is returned
as the second value of <code>run-program</code>. <code>t</code> designates the <code>*error-output*</code>.
Also <code>:output</code> means redirecting the error output to the output stream,
in which case <code>nil</code> is returned.
</p>
<p><code>if-error-output-exists</code> is similar to <code>if-output-exist</code>, except that it
affects <code>error-output</code> rather than <code>output</code>.
</p>
<p><code>input</code> is similar to <code>output</code>, except that <code>vomit-output-stream</code> is used,
no value is returned, and <code>t</code> designates the <code>*standard-input*</code>.
</p>
<p><code>if-input-does-not-exist</code>, which is only meaningful if <code>input</code> is a string
or a pathname, can take the values <code>:create</code> and <code>:error</code> (the
default). The meaning of these values is analogous to the
<code>if-does-not-exist</code> parameter to <code>open</code> with <code>:direction</code> <code>:input</code>.
</p>
<p><code>element-type</code> and <code>external-format</code> are passed on
to your Lisp implementation, when applicable, for creation of the output stream.
</p>
<p>One and only one of the stream slurping or vomiting may or may not happen
in parallel in parallel with the subprocess,
depending on options and implementation,
and with priority being given to output processing.
Other streams are completely produced or consumed
before or after the subprocess is spawned, using temporary files.
</p>
<p><code>run-program</code> returns <code>3</code> values:
<code>0-</code> the result of the <code>output</code> slurping if any, or <code>nil</code>
<code>1-</code> the result of the <code>error-output</code> slurping if any, or <code>nil</code>
<code>2-</code> either <code>0</code> if the subprocess exited with success status,
or an indication of failure via the <code>exit-code</code> of the process
</p></dd></dl>
<span id="Generic_002dFunction-uiop_002frun_002dprogram_003aslurp_002dinput_002dstream"></span><dl class="def">
<dt id="index-slurp_002dinput_002dstream"><span class="category">Generic Function: </span><span><strong>slurp-input-stream</strong> <em>processor input-stream &amp;key linewise prefix element-type buffer-size external-format if-exists if-does-not-exist at count stripped &amp;allow-other-keys </em><a href='uiop.html#index-slurp_002dinput_002dstream' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002frun_002dprogram_003aslurp_002dinput_002dstream"></span>
<p><code>slurp-input-stream</code> is a generic function with two positional arguments
<code>processor</code> and <code>input-stream</code> and additional keyword arguments, that consumes (slurps)
the contents of the <code>input-stream</code> and processes them according to a method
specified by <code>processor</code>.
</p>
<p>Built-in methods include the following:
</p><ul>
<li> if <code>processor</code> is a function, it is called with the <code>input-stream</code> as its argument
</li><li> if <code>processor</code> is a list, its first element should be a function. It will be applied to a cons of the
<code>input-stream</code> and the rest of the list. That is (x . y) will be treated as
(<code>apply</code> x &lt;stream&gt; y)
</li><li> if <code>processor</code> is an output-stream, the contents of <code>input-stream</code> is copied to the output-stream,
per copy-stream-to-stream, with appropriate keyword arguments.
</li><li> if <code>processor</code> is the symbol <code>cl:string</code> or the keyword <code>:string</code>, then the contents of <code>input-stream</code>
are returned as a string, as per <code>slurp-stream-string</code>.
</li><li> if <code>processor</code> is the keyword <code>:lines</code> then the <code>input-stream</code> will be handled by <code>slurp-stream-lines</code>.
</li><li> if <code>processor</code> is the keyword <code>:line</code> then the <code>input-stream</code> will be handled by <code>slurp-stream-line</code>.
</li><li> if <code>processor</code> is the keyword <code>:forms</code> then the <code>input-stream</code> will be handled by <code>slurp-stream-forms</code>.
</li><li> if <code>processor</code> is the keyword <code>:form</code> then the <code>input-stream</code> will be handled by <code>slurp-stream-form</code>.
</li><li> if <code>processor</code> is <code>t</code>, it is treated the same as *standard-output*. If it is <code>nil</code>, <code>nil</code> is returned.
</li></ul>
<p>Programmers are encouraged to define their own methods for this generic function.
</p></dd></dl>
<span id="Generic_002dFunction-uiop_002frun_002dprogram_003avomit_002doutput_002dstream"></span><dl class="def">
<dt id="index-vomit_002doutput_002dstream"><span class="category">Generic Function: </span><span><strong>vomit-output-stream</strong> <em>processor output-stream &amp;key linewise prefix element-type buffer-size external-format if-exists if-does-not-exist fresh-line terpri &amp;allow-other-keys </em><a href='uiop.html#index-vomit_002doutput_002dstream' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002frun_002dprogram_003avomit_002doutput_002dstream"></span>
<p><code>vomit-output-stream</code> is a generic function with two positional arguments
<code>processor</code> and <code>output-stream</code> and additional keyword arguments, that produces (vomits)
some content onto the <code>output-stream</code>, according to a method specified by <code>processor</code>.
</p>
<p>Built-in methods include the following:
</p><ul>
<li> if <code>processor</code> is a function, it is called with the <code>output-stream</code> as its argument
</li><li> if <code>processor</code> is a list, its first element should be a function.
It will be applied to a cons of the <code>output-stream</code> and the rest of the list.
That is (x . y) will be treated as (<code>apply</code> x &lt;stream&gt; y)
</li><li> if <code>processor</code> is an input-stream, its contents will be copied the <code>output-stream</code>,
per copy-stream-to-stream, with appropriate keyword arguments.
</li><li> if <code>processor</code> is a string, its contents will be printed to the <code>output-stream</code>.
</li><li> if <code>processor</code> is <code>t</code>, it is treated the same as *standard-input*. If it is <code>nil</code>, nothing is done.
</li></ul>
<p>Programmers are encouraged to define their own methods for this generic function.
</p></dd></dl>
<hr>
</div>
<div class="chapter" id="UIOP_002fCONFIGURATION">
<div class="header">
<p>
Next: <a href="uiop.html#UIOP_002fBACKWARD_002dDRIVER" accesskey="n" rel="next">UIOP/BACKWARD-DRIVER</a>, Previous: <a href="uiop.html#UIOP_002fRUN_002dPROGRAM" accesskey="p" rel="prev">UIOP/RUN-PROGRAM</a>, Up: <a href="uiop.html#Top" accesskey="u" rel="up">UIOP</a> &nbsp; [<a href="uiop.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<span id="UIOP_002fCONFIGURATION-1"></span><h2 class="chapter">14 UIOP/CONFIGURATION</h2>
<span id="Function-uiop_002fconfiguration_003aclear_002dconfiguration"></span><dl class="def">
<dt id="index-clear_002dconfiguration"><span class="category">Function: </span><span><strong>clear-configuration</strong><a href='uiop.html#index-clear_002dconfiguration' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003aclear_002dconfiguration"></span>
<p>Call the functions in <code>*clear-configuration-hook*</code>
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003aconfiguration_002dinheritance_002ddirective_002dp"></span><dl class="def">
<dt id="index-configuration_002dinheritance_002ddirective_002dp"><span class="category">Function: </span><span><strong>configuration-inheritance-directive-p</strong> <em>x</em><a href='uiop.html#index-configuration_002dinheritance_002ddirective_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003aconfiguration_002dinheritance_002ddirective_002dp"></span>
<p>Is <code>x</code> a configuration inheritance directive?
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003afilter_002dpathname_002dset"></span><dl class="def">
<dt id="index-filter_002dpathname_002dset"><span class="category">Function: </span><span><strong>filter-pathname-set</strong> <em>dirs</em><a href='uiop.html#index-filter_002dpathname_002dset' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003afilter_002dpathname_002dset"></span>
<p>Parse strings as unix namestrings and remove duplicates and non absolute-pathnames in a list.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003afind_002dpreferred_002dfile"></span><dl class="def">
<dt id="index-find_002dpreferred_002dfile"><span class="category">Function: </span><span><strong>find-preferred-file</strong> <em>files &amp;key direction</em><a href='uiop.html#index-find_002dpreferred_002dfile' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003afind_002dpreferred_002dfile"></span>
<p>Find first file in the list of <code>files</code> that exists (for direction :input or :probe)
or just the first one (for direction :output or :io).
Note that when we say &quot;file&quot; here, the files in question may be directories.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003aget_002dfolder_002dpath"></span><dl class="def">
<dt id="index-get_002dfolder_002dpath"><span class="category">Function: </span><span><strong>get-folder-path</strong> <em>folder</em><a href='uiop.html#index-get_002dfolder_002dpath' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003aget_002dfolder_002dpath"></span>
<p>Semi-portable implementation of a subset of LispWorks&rsquo; sys:get-folder-path,
this function tries to locate the Windows <code>folder</code> for one of
<code>:local-appdata</code>, <code>:appdata</code> or <code>:common-appdata</code>.
Returns <code>nil</code> when the folder is not defined (e.g., not on Windows).
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003ain_002dfirst_002ddirectory"></span><dl class="def">
<dt id="index-in_002dfirst_002ddirectory"><span class="category">Function: </span><span><strong>in-first-directory</strong> <em>dirs x &amp;key direction</em><a href='uiop.html#index-in_002dfirst_002ddirectory' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003ain_002dfirst_002ddirectory"></span>
<p>Finds the first appropriate file named <code>x</code> in the list of <code>dirs</code> for I/O
in <code>direction</code> (which may be <code>:input</code>, <code>:output</code>, <code>:io</code>, or <code>:probe</code>).
If direction is <code>:input</code> or <code>:probe</code>, will return the first extant file named
<code>x</code> in one of the <code>dirs</code>.
If direction is <code>:output</code> or <code>:io</code>, will simply return the file named <code>x</code> in the
first element of <code>dirs</code> that exists. <code>deprecated</code>.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003ain_002dsystem_002dconfiguration_002ddirectory"></span><dl class="def">
<dt id="index-in_002dsystem_002dconfiguration_002ddirectory"><span class="category">Function: </span><span><strong>in-system-configuration-directory</strong> <em>x &amp;key direction</em><a href='uiop.html#index-in_002dsystem_002dconfiguration_002ddirectory' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003ain_002dsystem_002dconfiguration_002ddirectory"></span>
<p>Return the pathname for the file named <code>x</code> under the system configuration directory
for common-lisp. <code>deprecated</code>.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003ain_002duser_002dconfiguration_002ddirectory"></span><dl class="def">
<dt id="index-in_002duser_002dconfiguration_002ddirectory"><span class="category">Function: </span><span><strong>in-user-configuration-directory</strong> <em>x &amp;key direction</em><a href='uiop.html#index-in_002duser_002dconfiguration_002ddirectory' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003ain_002duser_002dconfiguration_002ddirectory"></span>
<p>Return the file named <code>x</code> in the user configuration directory for common-lisp.
<code>deprecated</code>.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003alocation_002ddesignator_002dp"></span><dl class="def">
<dt id="index-location_002ddesignator_002dp"><span class="category">Function: </span><span><strong>location-designator-p</strong> <em>x</em><a href='uiop.html#index-location_002ddesignator_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003alocation_002ddesignator_002dp"></span>
<p>Is <code>x</code> a designator for a location?
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003alocation_002dfunction_002dp"></span><dl class="def">
<dt id="index-location_002dfunction_002dp"><span class="category">Function: </span><span><strong>location-function-p</strong> <em>x</em><a href='uiop.html#index-location_002dfunction_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003alocation_002dfunction_002dp"></span>
<p>Is <code>x</code> the specification of a location function?
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003aregister_002dclear_002dconfiguration_002dhook"></span><dl class="def">
<dt id="index-register_002dclear_002dconfiguration_002dhook"><span class="category">Function: </span><span><strong>register-clear-configuration-hook</strong> <em>hook-function &amp;optional call-now-p</em><a href='uiop.html#index-register_002dclear_002dconfiguration_002dhook' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003aregister_002dclear_002dconfiguration_002dhook"></span>
<p>Register a function to be called when clearing configuration
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003areport_002dinvalid_002dform"></span><dl class="def">
<dt id="index-report_002dinvalid_002dform"><span class="category">Function: </span><span><strong>report-invalid-form</strong> <em>reporter &amp;rest args</em><a href='uiop.html#index-report_002dinvalid_002dform' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003areport_002dinvalid_002dform"></span>
<p>Report an invalid form according to <code>reporter</code> and various <code>args</code>
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003aresolve_002dabsolute_002dlocation"></span><dl class="def">
<dt id="index-resolve_002dabsolute_002dlocation"><span class="category">Function: </span><span><strong>resolve-absolute-location</strong> <em>x &amp;key ensure-directory wilden</em><a href='uiop.html#index-resolve_002dabsolute_002dlocation' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003aresolve_002dabsolute_002dlocation"></span>
<p>Given a designator <code>x</code> for an absolute location, resolve it to a pathname
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003aresolve_002dlocation"></span><dl class="def">
<dt id="index-resolve_002dlocation"><span class="category">Function: </span><span><strong>resolve-location</strong> <em>x &amp;key ensure-directory wilden directory</em><a href='uiop.html#index-resolve_002dlocation' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003aresolve_002dlocation"></span>
<p>Resolve location designator <code>x</code> into a <code>pathname</code>
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003aresolve_002drelative_002dlocation"></span><dl class="def">
<dt id="index-resolve_002drelative_002dlocation"><span class="category">Function: </span><span><strong>resolve-relative-location</strong> <em>x &amp;key ensure-directory wilden</em><a href='uiop.html#index-resolve_002drelative_002dlocation' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003aresolve_002drelative_002dlocation"></span>
<p>Given a designator <code>x</code> for an relative location, resolve it to a pathname.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003asystem_002dconfig_002dpathnames"></span><dl class="def">
<dt id="index-system_002dconfig_002dpathnames"><span class="category">Function: </span><span><strong>system-config-pathnames</strong> <em>&amp;rest more</em><a href='uiop.html#index-system_002dconfig_002dpathnames' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003asystem_002dconfig_002dpathnames"></span>
<p>Return a list of directories where are stored the system&rsquo;s default user configuration information.
<code>more</code> may contain specifications for a subpath relative to these directories: a
subpathname specification and keyword arguments as per <code>resolve-location</code> (see
also &quot;Configuration DSL&quot;) in the ASDF manual.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003asystem_002dconfiguration_002ddirectories"></span><dl class="def">
<dt id="index-system_002dconfiguration_002ddirectories"><span class="category">Function: </span><span><strong>system-configuration-directories</strong><a href='uiop.html#index-system_002dconfiguration_002ddirectories' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003asystem_002dconfiguration_002ddirectories"></span>
<p>Return the list of system configuration directories for common-lisp.
<code>deprecated</code>. Use <code>uiop:system-config-pathnames</code> (with argument &quot;common-lisp&quot;),
instead.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003auiop_002ddirectory"></span><dl class="def">
<dt id="index-uiop_002ddirectory"><span class="category">Function: </span><span><strong>uiop-directory</strong><a href='uiop.html#index-uiop_002ddirectory' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003auiop_002ddirectory"></span>
<p>Try to locate the <code>uiop</code> source directory at runtime
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003aupgrade_002dconfiguration"></span><dl class="def">
<dt id="index-upgrade_002dconfiguration"><span class="category">Function: </span><span><strong>upgrade-configuration</strong><a href='uiop.html#index-upgrade_002dconfiguration' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003aupgrade_002dconfiguration"></span>
<p>If a previous version of ASDF failed to read some configuration, try again now.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003auser_002dconfiguration_002ddirectories"></span><dl class="def">
<dt id="index-user_002dconfiguration_002ddirectories"><span class="category">Function: </span><span><strong>user-configuration-directories</strong><a href='uiop.html#index-user_002dconfiguration_002ddirectories' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003auser_002dconfiguration_002ddirectories"></span>
<p>Return the current user&rsquo;s list of user configuration directories
for configuring common-lisp.
<code>deprecated</code>. Use <code>uiop:xdg-config-pathnames</code> instead.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003avalidate_002dconfiguration_002ddirectory"></span><dl class="def">
<dt id="index-validate_002dconfiguration_002ddirectory"><span class="category">Function: </span><span><strong>validate-configuration-directory</strong> <em>directory tag validator &amp;key invalid-form-reporter</em><a href='uiop.html#index-validate_002dconfiguration_002ddirectory' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003avalidate_002dconfiguration_002ddirectory"></span>
<p>Map the <code>validator</code> across the .conf files in <code>directory</code>, the <code>tag</code> will
be applied to the results to yield a configuration form. Current
values of <code>tag</code> include :source-registry and :output-translations.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003avalidate_002dconfiguration_002dfile"></span><dl class="def">
<dt id="index-validate_002dconfiguration_002dfile"><span class="category">Function: </span><span><strong>validate-configuration-file</strong> <em>file validator &amp;key description</em><a href='uiop.html#index-validate_002dconfiguration_002dfile' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003avalidate_002dconfiguration_002dfile"></span>
<p>Validate a configuration <code>file</code>. The configuration file should have only one s-expression
in it, which will be checked with the <code>validator</code> <code>form</code>. <code>description</code> argument used for error
reporting.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003avalidate_002dconfiguration_002dform"></span><dl class="def">
<dt id="index-validate_002dconfiguration_002dform"><span class="category">Function: </span><span><strong>validate-configuration-form</strong> <em>form tag directive-validator &amp;key location invalid-form-reporter</em><a href='uiop.html#index-validate_002dconfiguration_002dform' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003avalidate_002dconfiguration_002dform"></span>
<p>Validate a configuration <code>form</code>. By default it will raise an error if the
<code>form</code> is not valid. Otherwise it will return the validated form.
Arguments control the behavior:
The configuration <code>form</code> should be of the form (<code>tag</code> . &lt;rest&gt;)
Each element of &lt;rest&gt; will be checked by first seeing if it&rsquo;s a configuration inheritance
directive (see <code>configuration-inheritance-directive-p</code>) then invoking <code>directive-validator</code>
on it.
In the event of an invalid form, <code>invalid-form-reporter</code> will be used to control
reporting (see <code>report-invalid-form</code>) with <code>location</code> providing information about where
the configuration form appeared.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003axdg_002dcache_002dhome"></span><dl class="def">
<dt id="index-xdg_002dcache_002dhome"><span class="category">Function: </span><span><strong>xdg-cache-home</strong> <em>&amp;rest more</em><a href='uiop.html#index-xdg_002dcache_002dhome' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003axdg_002dcache_002dhome"></span>
<p>The base directory relative to which user specific non-essential data files should be stored.
Returns an absolute directory pathname.
<code>more</code> may contain specifications for a subpath relative to this directory: a
subpathname specification and keyword arguments as per <code>resolve-location</code> (see
also &quot;Configuration DSL&quot;) in the ASDF manual.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003axdg_002dconfig_002ddirs"></span><dl class="def">
<dt id="index-xdg_002dconfig_002ddirs"><span class="category">Function: </span><span><strong>xdg-config-dirs</strong> <em>&amp;rest more</em><a href='uiop.html#index-xdg_002dconfig_002ddirs' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003axdg_002dconfig_002ddirs"></span>
<p>The preference-ordered set of additional base paths to search for configuration files.
Returns a list of absolute directory pathnames.
<code>more</code> may contain specifications for a subpath relative to these directories:
subpathname specification and keyword arguments as per <code>resolve-location</code> (see
also &quot;Configuration DSL&quot;) in the ASDF manual.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003axdg_002dconfig_002dhome"></span><dl class="def">
<dt id="index-xdg_002dconfig_002dhome"><span class="category">Function: </span><span><strong>xdg-config-home</strong> <em>&amp;rest more</em><a href='uiop.html#index-xdg_002dconfig_002dhome' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003axdg_002dconfig_002dhome"></span>
<p>Returns a pathname for the directory containing user-specific configuration files.
<code>more</code> may contain specifications for a subpath relative to this directory: a
subpathname specification and keyword arguments as per <code>resolve-location</code> (see
also &quot;Configuration DSL&quot;) in the ASDF manual.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003axdg_002dconfig_002dpathnames"></span><dl class="def">
<dt id="index-xdg_002dconfig_002dpathnames"><span class="category">Function: </span><span><strong>xdg-config-pathnames</strong> <em>&amp;rest more</em><a href='uiop.html#index-xdg_002dconfig_002dpathnames' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003axdg_002dconfig_002dpathnames"></span>
<p>Return a list of pathnames for application configuration.
<code>more</code> may contain specifications for a subpath relative to these directories: a
subpathname specification and keyword arguments as per <code>resolve-location</code> (see
also &quot;Configuration DSL&quot;) in the ASDF manual.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003axdg_002ddata_002ddirs"></span><dl class="def">
<dt id="index-xdg_002ddata_002ddirs"><span class="category">Function: </span><span><strong>xdg-data-dirs</strong> <em>&amp;rest more</em><a href='uiop.html#index-xdg_002ddata_002ddirs' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003axdg_002ddata_002ddirs"></span>
<p>The preference-ordered set of additional paths to search for data files.
Returns a list of absolute directory pathnames.
<code>more</code> may contain specifications for a subpath relative to these directories: a
subpathname specification and keyword arguments as per <code>resolve-location</code> (see
also &quot;Configuration DSL&quot;) in the ASDF manual.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003axdg_002ddata_002dhome"></span><dl class="def">
<dt id="index-xdg_002ddata_002dhome"><span class="category">Function: </span><span><strong>xdg-data-home</strong> <em>&amp;rest more</em><a href='uiop.html#index-xdg_002ddata_002dhome' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003axdg_002ddata_002dhome"></span>
<p>Returns an absolute pathname for the directory containing user-specific data files.
<code>more</code> may contain specifications for a subpath relative to this directory: a
subpathname specification and keyword arguments as per <code>resolve-location</code> (see
also &quot;Configuration DSL&quot;) in the ASDF manual.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003axdg_002ddata_002dpathnames"></span><dl class="def">
<dt id="index-xdg_002ddata_002dpathnames"><span class="category">Function: </span><span><strong>xdg-data-pathnames</strong> <em>&amp;rest more</em><a href='uiop.html#index-xdg_002ddata_002dpathnames' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003axdg_002ddata_002dpathnames"></span>
<p>Return a list of absolute pathnames for application data directories. With <code>app</code>,
returns directory for data for that application, without <code>app</code>, returns the set of directories
for storing all application configurations.
<code>more</code> may contain specifications for a subpath relative to these directories: a
subpathname specification and keyword arguments as per <code>resolve-location</code> (see
also &quot;Configuration DSL&quot;) in the ASDF manual.
</p></dd></dl>
<span id="Function-uiop_002fconfiguration_003axdg_002druntime_002ddir"></span><dl class="def">
<dt id="index-xdg_002druntime_002ddir"><span class="category">Function: </span><span><strong>xdg-runtime-dir</strong> <em>&amp;rest more</em><a href='uiop.html#index-xdg_002druntime_002ddir' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003axdg_002druntime_002ddir"></span>
<p>Pathname for user-specific non-essential runtime files and other file objects,
such as sockets, named pipes, etc.
Returns an absolute directory pathname.
<code>more</code> may contain specifications for a subpath relative to this directory: a
subpathname specification and keyword arguments as per <code>resolve-location</code> (see
also &quot;Configuration DSL&quot;) in the ASDF manual.
</p></dd></dl>
<span id="Variable-uiop_002fconfiguration_003a_002ahere_002ddirectory_002a"></span><dl class="def">
<dt id="index-_002ahere_002ddirectory_002a"><span class="category">Variable: </span><span><strong>*here-directory*</strong><a href='uiop.html#index-_002ahere_002ddirectory_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003a_002ahere_002ddirectory_002a"></span>
<p>This special variable is bound to the currect directory during calls to
<code>process-source-registry</code> in order that we be able to interpret the :here
directive.
</p></dd></dl>
<span id="Variable-uiop_002fconfiguration_003a_002aignored_002dconfiguration_002dform_002a"></span><dl class="def">
<dt id="index-_002aignored_002dconfiguration_002dform_002a"><span class="category">Variable: </span><span><strong>*ignored-configuration-form*</strong><a href='uiop.html#index-_002aignored_002dconfiguration_002dform_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003a_002aignored_002dconfiguration_002dform_002a"></span>
<p>Have configuration forms been ignored while parsing the configuration?
</p></dd></dl>
<span id="Variable-uiop_002fconfiguration_003a_002auser_002dcache_002a"></span><dl class="def">
<dt id="index-_002auser_002dcache_002a"><span class="category">Variable: </span><span><strong>*user-cache*</strong><a href='uiop.html#index-_002auser_002dcache_002a' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fconfiguration_003a_002auser_002dcache_002a"></span>
<p>A specification as per <code>resolve-location</code> of where the user keeps his FASL cache
</p></dd></dl>
<hr>
</div>
<div class="chapter" id="UIOP_002fBACKWARD_002dDRIVER">
<div class="header">
<p>
Next: <a href="uiop.html#UIOP_002fDRIVER" accesskey="n" rel="next">UIOP/DRIVER</a>, Previous: <a href="uiop.html#UIOP_002fCONFIGURATION" accesskey="p" rel="prev">UIOP/CONFIGURATION</a>, Up: <a href="uiop.html#Top" accesskey="u" rel="up">UIOP</a> &nbsp; [<a href="uiop.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<span id="UIOP_002fBACKWARD_002dDRIVER-1"></span><h2 class="chapter">15 UIOP/BACKWARD-DRIVER</h2>
<p><code>uiop/backward-driver</code> provides backward-compatibility with
earlier incarnations of this library.
</p>
<span id="Function-uiop_002fbackward_002ddriver_003acoerce_002dpathname"></span><dl class="def">
<dt id="index-coerce_002dpathname"><span class="category">Function: </span><span><strong>coerce-pathname</strong> <em>name &amp;key type defaults</em><a href='uiop.html#index-coerce_002dpathname' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fbackward_002ddriver_003acoerce_002dpathname"></span>
<p><code>deprecated</code>. Please use <code>uiop:parse-unix-namestring</code> instead.
</p></dd></dl>
<span id="Function-uiop_002fbackward_002ddriver_003ain_002dfirst_002ddirectory"></span><dl class="def">
<dt id="index-in_002dfirst_002ddirectory-1"><span class="category">Function: </span><span><strong>in-first-directory</strong> <em>dirs x &amp;key direction</em><a href='uiop.html#index-in_002dfirst_002ddirectory-1' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fbackward_002ddriver_003ain_002dfirst_002ddirectory"></span>
<p>Finds the first appropriate file named <code>x</code> in the list of <code>dirs</code> for I/O
in <code>direction</code> (which may be <code>:input</code>, <code>:output</code>, <code>:io</code>, or <code>:probe</code>).
If direction is <code>:input</code> or <code>:probe</code>, will return the first extant file named
<code>x</code> in one of the <code>dirs</code>.
If direction is <code>:output</code> or <code>:io</code>, will simply return the file named <code>x</code> in the
first element of <code>dirs</code> that exists. <code>deprecated</code>.
</p></dd></dl>
<span id="Function-uiop_002fbackward_002ddriver_003ain_002dsystem_002dconfiguration_002ddirectory"></span><dl class="def">
<dt id="index-in_002dsystem_002dconfiguration_002ddirectory-1"><span class="category">Function: </span><span><strong>in-system-configuration-directory</strong> <em>x &amp;key direction</em><a href='uiop.html#index-in_002dsystem_002dconfiguration_002ddirectory-1' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fbackward_002ddriver_003ain_002dsystem_002dconfiguration_002ddirectory"></span>
<p>Return the pathname for the file named <code>x</code> under the system configuration directory
for common-lisp. <code>deprecated</code>.
</p></dd></dl>
<span id="Function-uiop_002fbackward_002ddriver_003ain_002duser_002dconfiguration_002ddirectory"></span><dl class="def">
<dt id="index-in_002duser_002dconfiguration_002ddirectory-1"><span class="category">Function: </span><span><strong>in-user-configuration-directory</strong> <em>x &amp;key direction</em><a href='uiop.html#index-in_002duser_002dconfiguration_002ddirectory-1' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fbackward_002ddriver_003ain_002duser_002dconfiguration_002ddirectory"></span>
<p>Return the file named <code>x</code> in the user configuration directory for common-lisp.
<code>deprecated</code>.
</p></dd></dl>
<span id="Function-uiop_002fbackward_002ddriver_003asystem_002dconfiguration_002ddirectories"></span><dl class="def">
<dt id="index-system_002dconfiguration_002ddirectories-1"><span class="category">Function: </span><span><strong>system-configuration-directories</strong><a href='uiop.html#index-system_002dconfiguration_002ddirectories-1' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fbackward_002ddriver_003asystem_002dconfiguration_002ddirectories"></span>
<p>Return the list of system configuration directories for common-lisp.
<code>deprecated</code>. Use <code>uiop:system-config-pathnames</code> (with argument &quot;common-lisp&quot;),
instead.
</p></dd></dl>
<span id="Function-uiop_002fbackward_002ddriver_003auser_002dconfiguration_002ddirectories"></span><dl class="def">
<dt id="index-user_002dconfiguration_002ddirectories-1"><span class="category">Function: </span><span><strong>user-configuration-directories</strong><a href='uiop.html#index-user_002dconfiguration_002ddirectories-1' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fbackward_002ddriver_003auser_002dconfiguration_002ddirectories"></span>
<p>Return the current user&rsquo;s list of user configuration directories
for configuring common-lisp.
<code>deprecated</code>. Use <code>uiop:xdg-config-pathnames</code> instead.
</p></dd></dl>
<span id="Function-uiop_002fbackward_002ddriver_003aversion_002dcompatible_002dp"></span><dl class="def">
<dt id="index-version_002dcompatible_002dp"><span class="category">Function: </span><span><strong>version-compatible-p</strong> <em>provided-version required-version</em><a href='uiop.html#index-version_002dcompatible_002dp' class='copiable-anchor'> &para;</a></span></dt>
<dd><span id="index-uiop_002fbackward_002ddriver_003aversion_002dcompatible_002dp"></span>
<p>Is the provided version a compatible substitution for the required-version?
If major versions differ, it&rsquo;s not compatible.
If they are equal, then any later version is compatible,
with later being determined by a lexicographical comparison of minor numbers.
<code>deprecated</code>.
</p></dd></dl>
<hr>
</div>
<div class="chapter" id="UIOP_002fDRIVER">
<div class="header">
<p>
Previous: <a href="uiop.html#UIOP_002fBACKWARD_002dDRIVER" accesskey="p" rel="prev">UIOP/BACKWARD-DRIVER</a>, Up: <a href="uiop.html#Top" accesskey="u" rel="up">UIOP</a> &nbsp; [<a href="uiop.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<span id="UIOP_002fDRIVER-1"></span><h2 class="chapter">16 UIOP/DRIVER</h2>
<p><code>uiop/driver</code> doesn&rsquo;t export any new symbols. It just exists to
reexport all the utilities in a single package <code>uiop</code>.
</p>
</div>
</div>
</body>
</html>