This file is indexed.

/usr/share/doc/racket/raco/unpack.html is in racket-doc 6.1-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>11&nbsp;raco unpack: Unpacking Library Collections</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9660;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x"><span class="stt">raco</span>:<span class="mywbr"> &nbsp;</span> Racket Command-<wbr></wbr>Line Tools</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="make.html" class="tocviewlink" data-pltdoc="x"><span class="stt">raco make</span>:<span class="mywbr"> &nbsp;</span> Compiling Source to Bytecode</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="exe.html" class="tocviewlink" data-pltdoc="x"><span class="stt">raco exe</span>:<span class="mywbr"> &nbsp;</span> Creating Stand-<wbr></wbr>Alone Executables</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="exe-dist.html" class="tocviewlink" data-pltdoc="x"><span class="stt">raco distribute</span>:<span class="mywbr"> &nbsp;</span> Sharing Stand-<wbr></wbr>Alone Executables</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="planet.html" class="tocviewlink" data-pltdoc="x"><span class="stt">raco planet</span>:<span class="mywbr"> &nbsp;</span> Automatic Package Distribution</a></td></tr><tr><td align="right">5&nbsp;</td><td><a href="pkg.html" class="tocviewlink" data-pltdoc="x"><span class="stt">raco pkg</span>:<span class="mywbr"> &nbsp;</span> Package Management</a></td></tr><tr><td align="right">6&nbsp;</td><td><a href="setup.html" class="tocviewlink" data-pltdoc="x"><span class="stt">raco setup</span>:<span class="mywbr"> &nbsp;</span> Installation Management</a></td></tr><tr><td align="right">7&nbsp;</td><td><a href="decompile.html" class="tocviewlink" data-pltdoc="x"><span class="stt">raco decompile</span>:<span class="mywbr"> &nbsp;</span> Decompiling Bytecode</a></td></tr><tr><td align="right">8&nbsp;</td><td><a href="demod.html" class="tocviewlink" data-pltdoc="x"><span class="stt">raco demod</span>:<span class="mywbr"> &nbsp;</span> Demodularizing Programs</a></td></tr><tr><td align="right">9&nbsp;</td><td><a href="link.html" class="tocviewlink" data-pltdoc="x"><span class="stt">raco link</span>:<span class="mywbr"> &nbsp;</span> Library Collection Links</a></td></tr><tr><td align="right">10&nbsp;</td><td><a href="plt.html" class="tocviewlink" data-pltdoc="x"><span class="stt">raco pack</span>:<span class="mywbr"> &nbsp;</span> Packing Library Collections</a></td></tr><tr><td align="right">11&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x"><span class="stt">raco unpack</span>:<span class="mywbr"> &nbsp;</span> Unpacking Library Collections</a></td></tr><tr><td align="right">12&nbsp;</td><td><a href="ctool.html" class="tocviewlink" data-pltdoc="x"><span class="stt">raco ctool</span>:<span class="mywbr"> &nbsp;</span> Working with C Code</a></td></tr><tr><td align="right">13&nbsp;</td><td><a href="test.html" class="tocviewlink" data-pltdoc="x"><span class="stt">raco test</span>:<span class="mywbr"> &nbsp;</span> Run tests</a></td></tr><tr><td align="right">14&nbsp;</td><td><a href="docs.html" class="tocviewlink" data-pltdoc="x"><span class="stt">raco docs</span>:<span class="mywbr"> &nbsp;</span> Documentation Search</a></td></tr><tr><td align="right">15&nbsp;</td><td><a href="expand.html" class="tocviewlink" data-pltdoc="x"><span class="stt">raco expand</span>:<span class="mywbr"> &nbsp;</span> Macro Expansion</a></td></tr><tr><td align="right">16&nbsp;</td><td><a href="scribble.html" class="tocviewlink" data-pltdoc="x"><span class="stt">raco scribble</span>:<span class="mywbr"> &nbsp;</span> Building Documentation</a></td></tr><tr><td align="right">17&nbsp;</td><td><a href="command.html" class="tocviewlink" data-pltdoc="x">Adding a <span class="stt">raco</span> Command</a></td></tr><tr><td align="right">18&nbsp;</td><td><a href="config-file.html" class="tocviewlink" data-pltdoc="x">Installation Configuration and Search Paths</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_1&quot;);">&#9658;</a></td><td>11&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x"><span class="stt">raco unpack</span>:<span class="mywbr"> &nbsp;</span> Unpacking Library Collections</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">11.1&nbsp;</td><td><a href="#%28part._unpacking-..plt-archives%29" class="tocviewlink" data-pltdoc="x">Unpacking API</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">11.1<tt>&nbsp;</tt></span><a href="#%28part._unpacking-..plt-archives%29" class="tocsubseclink" data-pltdoc="x">Unpacking API</a></td></tr><tr><td><a href="#%28def._%28%28lib._setup%2Funpack..rkt%29._unpack%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">unpack</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._setup%2Funpack..rkt%29._fold-plt-archive%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">fold-<wbr></wbr>plt-<wbr></wbr>archive</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.1&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="plt.html" title="backward to &quot;10 raco pack: Packing Library Collections&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;raco: Racket Command-Line Tools&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="ctool.html" title="forward to &quot;12 raco ctool: Working with C Code&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h3 x-source-module="(lib &quot;scribblings/raco/raco.scrbl&quot;)" x-part-tag="&quot;unpack&quot;">11<tt>&nbsp;</tt><a name="(part._unpack)"></a><span class="stt">raco unpack</span>: Unpacking Library Collections</h3><p>The <span class="stt">raco unpack</span> command unpacks a <span class="stt">".plt"</span> archive (see
<a href="plt.html" data-pltdoc="x"><span class="stt">raco pack</span>: Packing Library Collections</a>) to the current directory without attempting to install
any collections. Use <span class="stt">raco pkg</span> (see <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=pkg&amp;rel=index.html&amp;version=6.1" class="Sq" data-pltdoc="x">Package Management in Racket</a>) to install a <span class="stt">".plt"</span> archive as
a package, or use <span class="stt">raco setup -A</span> (see <a href="setup.html" data-pltdoc="x"><span class="stt">raco setup</span>: Installation Management</a>) to
unpack and install collections from a <span class="stt">".plt"</span> archive.</p><p>Command-line flags:</p><ul><li><p><span class="nobreak"><span class="stt">-l</span></span> or <span class="nobreak"><span class="stt">--list</span></span> &#8212;<wbr></wbr> lists the content of the archive
without unpacking it.</p></li><li><p><span class="nobreak"><span class="stt">-c</span></span> or <span class="nobreak"><span class="stt">--config</span></span> &#8212;<wbr></wbr> shows the archive configuration
before unpacking or listing the archive content.</p></li><li><p><span class="nobreak"><span class="stt">-f</span></span> or <span class="nobreak"><span class="stt">--force</span></span> &#8212;<wbr></wbr> replace files that exist already;
fails that the archive says should be replaced will be replaced
without this flag.</p></li></ul><h4 x-source-module="(lib &quot;scribblings/raco/raco.scrbl&quot;)" x-part-tag="&quot;unpacking-.plt-archives&quot;">11.1<tt>&nbsp;</tt><a name="(part._unpacking-..plt-archives)"></a><a name="(mod-path._setup/unpack)"></a>Unpacking API</h4><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._setup%2Funpack%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">setup/unpack</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The <a href="#%28mod-path._setup%2Funpack%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">setup/unpack</span></a>
library provides raw support for unpacking a <span class="stt">".plt"</span> file.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._setup/unpack..rkt)._unpack))"></a><span title="Provided from: setup/unpack | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._setup%2Funpack..rkt%29._unpack%29%29" class="RktValDef RktValLink" data-pltdoc="x">unpack</a></span></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">archive</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span>[</td><td><span class="RktVar">main-collects-parent-dir</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">print-status</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">get-target-directory</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">force?</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">get-target-plt-directory</span>]<span class="RktPn">)</span></td><td><span class="hspace">&nbsp;</span></td><td>&rarr;</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">archive</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">main-collects-parent-dir</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Filesystem.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._current-directory%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">current-directory</a></span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace">&nbsp;&nbsp;</span></td><td><span class="RktVar">print-status</span></td><td><span class="hspace">&nbsp;</span></td><td>:</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><span class="nobreak">-&gt;</span></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym">any</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td>=</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._printf%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">printf</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"~a\n"</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace">&nbsp;&nbsp;</span></td><td><span class="RktVar">get-target-directory</span></td><td><span class="hspace">&nbsp;</span></td><td>:</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktPn">(</span><span class="RktSym"><span class="nobreak">-&gt;</span></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td>=</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Filesystem.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._current-directory%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">current-directory</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">force?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym">any/c</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace">&nbsp;&nbsp;</span></td><td><span class="RktVar">get-target-plt-directory</span></td><td><span class="hspace">&nbsp;</span></td><td>:</td><td><span class="hspace">&nbsp;</span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">listof</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><span class="nobreak">-&gt;</span></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td>=</td><td><span class="hspace">&nbsp;</span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktVar">preferred-dir</span><span class="hspace">&nbsp;</span><span class="RktVar">main-dir</span><span class="hspace">&nbsp;</span><span class="RktVar">options</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">preferred-dir</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Unpacks <span class="RktVar">archive</span>.</div></p><p>The <span class="RktVar">main-collects-parent-dir</span> argument is passed along to
<span class="RktVar">get-target-plt-directory</span>.</p><p>The <span class="RktVar">print-status</span> argument is used to report unpacking
progress.</p><p>The <span class="RktVar">get-target-directory</span> argument is used to get the
destination directory for unpacking an archive whose content is
relative to an arbitrary directory.</p><p>If <span class="RktVar">force?</span> is true, then version and required-collection
mismatches (comparing information in the archive to the current
installation) are ignored.</p><p>The <span class="RktVar">get-target-plt-directory</span> function is called to select a
target for installation for an archive whose is relative to the
installation. The function should normally return one if its first two
arguments; the third argument merely contains the first two, but has
only one element if the first two are the same. If the archive does
not request installation for all uses, then the first two arguments
will be different, and the former will be a user-specific location,
while the second will refer to the main installation.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._setup/unpack..rkt)._fold-plt-archive))"></a><span title="Provided from: setup/unpack | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._setup%2Funpack..rkt%29._fold-plt-archive%29%29" class="RktValDef RktValLink" data-pltdoc="x">fold-plt-archive</a></span></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">archive</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">on-config-fn</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">on-setup-unit</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">on-directory</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">on-file</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">initial-value</span><span class="RktPn">)</span></td><td><span class="hspace">&nbsp;</span></td><td>&rarr;</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktSym">any/c</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">archive</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">on-config-fn</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">any/c</span><span class="hspace">&nbsp;</span><span class="RktSym">any/c</span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><span class="nobreak">-&gt;</span></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym">any/c</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">on-setup-unit</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">any/c</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span><span class="hspace">&nbsp;</span><span class="RktSym">any/c</span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><span class="nobreak">-&gt;</span></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym">any/c</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace">&nbsp;&nbsp;</span></td><td><span class="RktVar">on-directory</span></td><td><span class="hspace">&nbsp;</span></td><td>:</td><td><span class="hspace">&nbsp;</span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">list/c</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">collects</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">doc</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">lib</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">include</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;</span><span class="RktSym">any/c</span></td></tr><tr><td><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><span class="nobreak">-&gt;</span></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym">any/c</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace">&nbsp;&nbsp;</span></td><td><span class="RktVar">on-file</span></td><td><span class="hspace">&nbsp;</span></td><td>:</td><td><span class="hspace">&nbsp;</span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">list/c</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">collects</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">doc</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">lib</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">include</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym">any/c</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><span class="nobreak">-&gt;</span></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym">any/c</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">list/c</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">collects</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">doc</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">lib</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">include</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">one-of/c</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">file</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">file-replace</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym">any/c</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><span class="nobreak">-&gt;</span></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym">any/c</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">initial-value</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym">any/c</span></td></tr></table></blockquote></div><div class="SIntrapara">Traverses the content of <span class="RktVar">archive</span>, which must be a
<span class="stt">".plt"</span> archive that is created with the default unpacking
unit and configuration expression. The configuration expression is not
evaluated, the unpacking unit is not invoked, and not files are
unpacked to the filesystem. Instead, the information in the archive is
reported back through <span class="RktSym">on-config</span>, <span class="RktVar">on-setup-unit</span>,
<span class="RktVar">on-directory</span>, and <span class="RktVar">on-file</span>, each of which can build on
an accumulated value that starts with <span class="RktVar">initial-value</span> and whose
final value is returned.</div></p><p>The <span class="RktVar">on-config-fn</span> function is called once with an S-expression
that represents a function to implement configuration information.
The second argument to <span class="RktSym">on-config</span> is <span class="RktVar">initial-value</span>,
and the function&rsquo;s result is passes on as the last argument to <span class="RktVar">on-setup-unit</span>.</p><p>The <span class="RktVar">on-setup-unit</span> function is called with the S-expression
representation of the installation unit, an input port that points to
the rest of the file, and the accumulated value. This input port is
the same port that will be used in the rest of processing, so if
<span class="RktVar">on-setup-unit</span> consumes any data from the port, then that data
will not be consumed by the remaining functions. (This means that
on-setup-unit can leave processing in an inconsistent state, which is
not checked by anything, and therefore could cause an error.)
The result of <span class="RktVar">on-setup-unit</span> becomes the new accumulated value.</p><p>For each directory that would be created by the archive when unpacking
normally, <span class="RktVar">on-directory</span> is called with the directory
path (described more below) and the accumulated value up to that
point, and its result is the new accumulated value.</p><p>For each file that would be created by the archive when unpacking
normally, <span class="RktVar">on-file</span> is called with the file path (described
more below), an input port containing the contents of the file, an
optional mode symbol indicating whether the file should be replaced,
and the accumulated value up to that point; its result is the new
accumulated value. The input port can be used or ignored, and parsing
of the rest of the file continues the same either way. After
<span class="RktVar">on-file</span> returns control, however, the input port is drained
of its content.</p><p>A directory or file path can be a plain path, or it can be a list
containing <span class="RktVal">'</span><span class="RktVal">collects</span>, <span class="RktVal">'</span><span class="RktVal">doc</span>, <span class="RktVal">'</span><span class="RktVal">lib</span>, or
<span class="RktVal">'</span><span class="RktVal">include</span> and a relative path. The latter case corresponds to
a directory or file relative to a target installation&rsquo;s collection
directory (in the sense of <span class="RktSym"><a href="dirs.html#%28def._%28%28lib._setup%2Fdirs..rkt%29._find-collects-dir%29%29" class="RktValLink" data-pltdoc="x">find-collects-dir</a></span>), documentation
directory (in the sense of <span class="RktSym"><a href="dirs.html#%28def._%28%28lib._setup%2Fdirs..rkt%29._find-doc-dir%29%29" class="RktValLink" data-pltdoc="x">find-doc-dir</a></span>), library
directory (in the sense of <span class="RktSym"><a href="dirs.html#%28def._%28%28lib._setup%2Fdirs..rkt%29._find-lib-dir%29%29" class="RktValLink" data-pltdoc="x">find-lib-dir</a></span>), or &ldquo;include&rdquo;
directory (in the sense of <span class="RktSym"><a href="dirs.html#%28def._%28%28lib._setup%2Fdirs..rkt%29._find-include-dir%29%29" class="RktValLink" data-pltdoc="x">find-include-dir</a></span>).</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.1&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="plt.html" title="backward to &quot;10 raco pack: Packing Library Collections&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;raco: Racket Command-Line Tools&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="ctool.html" title="forward to &quot;12 raco ctool: Working with C Code&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>