This file is indexed.

/usr/share/doc/racket/raco/relative-paths.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
<!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>6.9&nbsp;API for Relative Paths</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;);">&#9658;</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: none;" 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="tocviewselflink" 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="unpack.html" class="tocviewlink" 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;);">&#9660;</a></td><td>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></table><div class="tocviewsublist" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">6.1&nbsp;</td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running <span class="stt">raco setup</span></a></td></tr><tr><td align="right">6.2&nbsp;</td><td><a href="raco-setup-A.html" class="tocviewlink" data-pltdoc="x">Installing <span class="stt">".plt"</span> Archives</a></td></tr><tr><td align="right">6.3&nbsp;</td><td><a href="setup-info.html" class="tocviewlink" data-pltdoc="x">Controlling <span class="stt">raco setup</span> with <span class="stt">"info.rkt"</span> Files</a></td></tr><tr><td align="right">6.4&nbsp;</td><td><a href="info_rkt.html" class="tocviewlink" data-pltdoc="x"><span class="stt">"info.rkt"</span> File Format</a></td></tr><tr><td align="right">6.5&nbsp;</td><td><a href="setup-plt-plt.html" class="tocviewlink" data-pltdoc="x">API for Setup</a></td></tr><tr><td align="right">6.6&nbsp;</td><td><a href="_plt-archives.html" class="tocviewlink" data-pltdoc="x">API for Installing <span class="stt">".plt"</span> Archives</a></td></tr><tr><td align="right">6.7&nbsp;</td><td><a href="dirs.html" class="tocviewlink" data-pltdoc="x">API for Finding Installation Directories</a></td></tr><tr><td align="right">6.8&nbsp;</td><td><a href="getinfo.html" class="tocviewlink" data-pltdoc="x">API for Reading <span class="stt">"info.rkt"</span> Files</a></td></tr><tr><td align="right">6.9&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">API for Relative Paths</a></td></tr><tr><td align="right">6.10&nbsp;</td><td><a href="collection-names.html" class="tocviewlink" data-pltdoc="x">API for Collection Names</a></td></tr><tr><td align="right">6.11&nbsp;</td><td><a href="matching-platform.html" class="tocviewlink" data-pltdoc="x">API for Platform Specifications</a></td></tr><tr><td align="right">6.12&nbsp;</td><td><a href="xref.html" class="tocviewlink" data-pltdoc="x">API for Cross-<wbr></wbr>References for Installed Manuals</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_2&quot;);">&#9658;</a></td><td>6.9&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">API for Relative Paths</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">6.9.1&nbsp;</td><td><a href="#%28part._.Representing_.Collection-.Based_.Paths%29" class="tocviewlink" data-pltdoc="x">Representing Collection-<wbr></wbr>Based Paths</a></td></tr><tr><td align="right">6.9.2&nbsp;</td><td><a href="#%28part._.Representing_.Paths_.Relative_to__collects_%29" class="tocviewlink" data-pltdoc="x">Representing Paths Relative to <span class="stt">"collects"</span></a></td></tr><tr><td align="right">6.9.3&nbsp;</td><td><a href="#%28part._.Displaying_.Paths_.Relative_to_a_.Common_.Root%29" class="tocviewlink" data-pltdoc="x">Displaying Paths Relative to a Common Root</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">6.9.1<tt>&nbsp;</tt></span><a href="#%28part._.Representing_.Collection-.Based_.Paths%29" class="tocsubseclink" data-pltdoc="x">Representing Collection-<wbr></wbr>Based Paths</a></td></tr><tr><td><a href="#%28def._%28%28lib._setup%2Fcollects..rkt%29._path-~3ecollects-relative%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">path-<wbr></wbr>&gt;collects-<wbr></wbr>relative</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._setup%2Fcollects..rkt%29._collects-relative-~3epath%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">collects-<wbr></wbr>relative-<wbr></wbr>&gt;path</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._setup%2Fcollects..rkt%29._path-~3emodule-path%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">path-<wbr></wbr>&gt;module-<wbr></wbr>path</span></span></a></td></tr><tr><td><span class="tocsublinknumber">6.9.2<tt>&nbsp;</tt></span><a href="#%28part._.Representing_.Paths_.Relative_to__collects_%29" class="tocsubseclink" data-pltdoc="x">Representing Paths Relative to <span class="stt">"collects"</span></a></td></tr><tr><td><a href="#%28def._%28%28lib._setup%2Fmain-collects..rkt%29._path-~3emain-collects-relative%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">path-<wbr></wbr>&gt;main-<wbr></wbr>collects-<wbr></wbr>relative</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._setup%2Fmain-collects..rkt%29._main-collects-relative-~3epath%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">main-<wbr></wbr>collects-<wbr></wbr>relative-<wbr></wbr>&gt;path</span></span></a></td></tr><tr><td><span class="tocsublinknumber">6.9.3<tt>&nbsp;</tt></span><a href="#%28part._.Displaying_.Paths_.Relative_to_a_.Common_.Root%29" class="tocsubseclink" data-pltdoc="x">Displaying Paths Relative to a Common Root</a></td></tr><tr><td><a href="#%28def._%28%28lib._setup%2Fpath-to-relative..rkt%29._path-~3erelative-string%2Flibrary%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">path-<wbr></wbr>&gt;relative-<wbr></wbr>string/<span class="mywbr"> &nbsp;</span>library</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._setup%2Fpath-to-relative..rkt%29._path-~3erelative-string%2Fsetup%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">path-<wbr></wbr>&gt;relative-<wbr></wbr>string/<span class="mywbr"> &nbsp;</span>setup</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._setup%2Fpath-to-relative..rkt%29._make-path-~3erelative-string%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>path-<wbr></wbr>&gt;relative-<wbr></wbr>string</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="getinfo.html" title="backward to &quot;6.8 API for Reading &quot;info.rkt&quot; Files&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="setup.html" title="up to &quot;6 raco setup: Installation Management&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="collection-names.html" title="forward to &quot;6.10 API for Collection Names&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h4 x-source-module="(lib &quot;scribblings/raco/raco.scrbl&quot;)" x-part-tag="&quot;relative-paths&quot;">6.9<tt>&nbsp;</tt><a name="(part._relative-paths)"></a>API for Relative Paths</h4><p>The Racket installation tree can usually be moved around the filesystem.
To support this, care must be taken to avoid absolute paths.  The
following two APIs cover two aspects of this: a way to convert a path to
a value that is relative to the <span class="stt">"collets"</span> tree, and a way to
display such paths (e.g., in error messages).</p><h5 x-source-module="(lib &quot;scribblings/raco/raco.scrbl&quot;)" x-part-tag="&quot;Representing_Collection-Based_Paths&quot;">6.9.1<tt>&nbsp;</tt><a name="(part._.Representing_.Collection-.Based_.Paths)"></a><a name="(mod-path._setup/collects)"></a>Representing Collection-Based Paths</h5><p><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%2Fcollects%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">setup/collects</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></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/collects..rkt)._path-~3ecollects-relative))"></a><span title="Provided from: setup/collects | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._setup%2Fcollects..rkt%29._path-~3ecollects-relative%29%29" class="RktValDef RktValLink" data-pltdoc="x">path-&gt;collects-relative</a></span></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">path</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="RktPn">#:cache</span><span class="hspace">&nbsp;</span><span class="RktVar">cache</span><span class="RktPn">)</span></td><td><span class="hspace">&nbsp;</span></td></tr></table></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td><span class="hspace">&nbsp;</span></td><td>&rarr;</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></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;</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._cons%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">collects</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._cons%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">cons/c</a></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=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._non-empty-listof%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">non-empty-listof</a></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=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span><span class="RktPn">)</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">path</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">cache</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._and%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">and/c</a></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=hashtables.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._hash%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">hash?</a></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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._not%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">not/c</a></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=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._immutable%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Checks whether <span class="RktVar">path</span> (normalized by
<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%2528quote._%7E23%7E25kernel%2529._path-%7E3ecomplete-path%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-&gt;complete-path</a></span> and <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%2528quote._%7E23%7E25kernel%2529._simplify-path%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">simplify-path</a></span> with
<span class="RktVal">#f</span> as its second argument) matches the result of
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=collects.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._collection-file-path%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">collection-file-path</a></span>. If so, the result is a list starting
with <span class="RktVal">'</span><span class="RktVal">collects</span> and containing the relevant path elements as
byte strings. If not, the path is returned as-is.</div></p><p>The <span class="RktVar">cache</span> argument is used with <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=pkg&amp;rel=path.html%23%2528def._%2528%2528lib._pkg%252Fpath..rkt%2529._path-%7E3epkg%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-&gt;pkg</a></span>, if needed.</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._setup/collects..rkt)._collects-relative-~3epath))"></a><span title="Provided from: setup/collects | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._setup%2Fcollects..rkt%29._collects-relative-~3epath%29%29" class="RktValDef RktValLink" data-pltdoc="x">collects-relative-&gt;path</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">rel</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<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></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace">&nbsp;&nbsp;</span></td><td><span class="RktVar">rel</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></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;</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._cons%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">collects</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._cons%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">cons/c</a></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=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._non-empty-listof%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">non-empty-listof</a></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=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">The inverse of <span class="RktSym"><a href="#%28def._%28%28lib._setup%2Fcollects..rkt%29._path-~3ecollects-relative%29%29" class="RktValLink" data-pltdoc="x">path-&gt;collects-relative</a></span>: if <span class="RktVar">rel</span>
is a pair that starts with <span class="RktVal">'</span><span class="RktVal">collects</span>, then it is converted
back to a path using <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=collects.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._collection-file-path%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">collection-file-path</a></span>.</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._setup/collects..rkt)._path-~3emodule-path))"></a><span title="Provided from: setup/collects | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._setup%2Fcollects..rkt%29._path-~3emodule-path%29%29" class="RktValDef RktValLink" data-pltdoc="x">path-&gt;module-path</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">path</span><span class="hspace">&nbsp;</span><span class="RktPn">#:cache</span><span class="hspace">&nbsp;</span><span class="RktVar">cache</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></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="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">module-path?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">path</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">cache</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._and%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">and/c</a></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=hashtables.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._hash%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">hash?</a></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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._not%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">not/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym">imutable?</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._setup%2Fcollects..rkt%29._path-~3ecollects-relative%29%29" class="RktValLink" data-pltdoc="x">path-&gt;collects-relative</a></span>, but the result is either
<span class="RktVar">path</span> or a normalized (in the sense of
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=syntax&amp;rel=module-helpers.html%23%2528def._%2528%2528lib._syntax%252Fmodcollapse..rkt%2529._collapse-module-path%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">collapse-module-path</a></span>) module path.</div></p><h5 x-source-module="(lib &quot;scribblings/raco/raco.scrbl&quot;)" x-part-tag="&quot;Representing_Paths_Relative_to__collects_&quot;">6.9.2<tt>&nbsp;</tt><a name="(part._.Representing_.Paths_.Relative_to__collects_)"></a><a name="(mod-path._setup/main-collects)"></a>Representing Paths Relative to <span class="stt">"collects"</span></h5><p><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%2Fmain-collects%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">setup/main-collects</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></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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._setup/main-collects..rkt)._path-~3emain-collects-relative))"></a><span title="Provided from: setup/main-collects | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._setup%2Fmain-collects..rkt%29._path-~3emain-collects-relative%29%29" class="RktValDef RktValLink" data-pltdoc="x">path-&gt;main-collects-relative</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">path</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></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%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path?</a></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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._cons%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">collects</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._non-empty-listof%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">non-empty-listof</a></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=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">path</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></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=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></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></blockquote></div><div class="SIntrapara">Checks whether <span class="RktVar">path</span> has a prefix that matches the prefix to
the main <span class="stt">"collects"</span> directory as determined by
<span class="RktPn">(</span><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><span class="RktPn">)</span>. If so, the result is a list starting
with <span class="RktVal">'</span><span class="RktVal">collects</span> and containing the remaining path elements as
byte strings. If not, the path is returned as-is.</div></p><p>The <span class="RktVar">path</span> argument should be a complete path. Applying
<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%2528quote._%7E23%7E25kernel%2529._simplify-path%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">simplify-path</a></span> before <span class="RktSym"><a href="#%28def._%28%28lib._setup%2Fmain-collects..rkt%29._path-~3emain-collects-relative%29%29" class="RktValLink" data-pltdoc="x">path-&gt;main-collects-relative</a></span> is
usually a good idea.</p><p>For historical reasons, <span class="RktVar">path</span> can be a byte string, which is
converted to a path using <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%2528quote._%7E23%7E25kernel%2529._bytes-%7E3epath%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes-&gt;path</a></span>.</p><p>See also <span class="RktSym"><a href="#%28def._%28%28lib._setup%2Fcollects..rkt%29._collects-relative-~3epath%29%29" class="RktValLink" data-pltdoc="x">collects-relative-&gt;path</a></span>.</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._setup/main-collects..rkt)._main-collects-relative-~3epath))"></a><span title="Provided from: setup/main-collects | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._setup%2Fmain-collects..rkt%29._main-collects-relative-~3epath%29%29" class="RktValDef RktValLink" data-pltdoc="x">main-collects-relative-&gt;path</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">rel</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym">path&gt;</span></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace">&nbsp;&nbsp;</span></td><td><span class="RktVar">rel</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></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=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&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></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._cons%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">collects</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._non-empty-listof%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">non-empty-listof</a></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=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">The inverse of <span class="RktSym"><a href="#%28def._%28%28lib._setup%2Fmain-collects..rkt%29._path-~3emain-collects-relative%29%29" class="RktValLink" data-pltdoc="x">path-&gt;main-collects-relative</a></span>: if <span class="RktVar">rel</span>
is a pair that starts with <span class="RktVal">'</span><span class="RktVal">collects</span>, then it is converted
back to a path relative to <span class="RktPn">(</span><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><span class="RktPn">)</span>.</div></p><h5 x-source-module="(lib &quot;scribblings/raco/raco.scrbl&quot;)" x-part-tag="&quot;Displaying_Paths_Relative_to_a_Common_Root&quot;">6.9.3<tt>&nbsp;</tt><a name="(part._.Displaying_.Paths_.Relative_to_a_.Common_.Root)"></a><a name="(mod-path._setup/path-to-relative)"></a>Displaying Paths Relative to a Common Root</h5><p><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%2Fpath-to-relative%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">setup/path-to-relative</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></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/path-to-relative..rkt)._path-~3erelative-string/library))"></a><span title="Provided from: setup/path-to-relative | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._setup%2Fpath-to-relative..rkt%29._path-~3erelative-string%2Flibrary%29%29" class="RktValDef RktValLink" data-pltdoc="x">path-&gt;relative-string/library</a></span></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">path</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">default</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="RktPn">#:cache</span><span class="hspace">&nbsp;</span><span class="RktVar">cache</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">path</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><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace">&nbsp;&nbsp;</span></td><td><span class="RktVar">default</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></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=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></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="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</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="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=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">if</a></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=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path?</a></span><span class="hspace">&nbsp;</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=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path-%7E3estring%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-&gt;string</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</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><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">cache</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._and%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">and/c</a></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=hashtables.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._hash%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">hash?</a></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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._not%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">not/c</a></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=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._immutable%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a string suitable for display in error messages.  If the path
is an absolute one that is inside a package, the
result is a string that begins with <span class="RktVal">"&lt;pkgs&gt;/"</span>. If the path
is an absolute one that is inside the <span class="stt">"collects"</span> tree, the
result is a string that begins with <span class="RktVal">"&lt;collects&gt;/"</span>.
Similarly, a path in the user-specific collects results in a prefix of
<span class="RktVal">"&lt;user-collects&gt;/"</span>, and a <span class="planetName">PLaneT</span> path results in
<span class="RktVal">"&lt;planet&gt;/"</span>.</div></p><p>If <span class="RktVar">cache</span> is not <span class="RktVal">#f</span>, it is used as a cache argument
for <span class="RktSym">pkg-&gt;path</span> to speed up detection and conversion of
package paths.</p><p>If the path is not absolute, or if it is not in any of these, it is
returned as-is (converted to a string if needed).  If <span class="RktVar">default</span>
is given, it specifies the return value instead: it can be a procedure
that is applied onto the path to get the result, or the result
itself.</p><p>Note that this function can return a non-string only if
<span class="RktVar">default</span> is given and it does not return a string.</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/path-to-relative..rkt)._path-~3erelative-string/setup))"></a><span title="Provided from: setup/path-to-relative | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._setup%2Fpath-to-relative..rkt%29._path-~3erelative-string%2Fsetup%29%29" class="RktValDef RktValLink" data-pltdoc="x">path-&gt;relative-string/setup</a></span></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">path</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">default</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="RktPn">#:cache</span><span class="hspace">&nbsp;</span><span class="RktVar">cache</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">path</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><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace">&nbsp;&nbsp;</span></td><td><span class="RktVar">default</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></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=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></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="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</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="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=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">if</a></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=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path?</a></span><span class="hspace">&nbsp;</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=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path-%7E3estring%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-&gt;string</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</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><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">cache</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._and%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">and/c</a></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=hashtables.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._hash%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">hash?</a></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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._not%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">not/c</a></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=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._immutable%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">The same as <span class="RktSym"><a href="#%28def._%28%28lib._setup%2Fpath-to-relative..rkt%29._path-~3erelative-string%2Flibrary%29%29" class="RktValLink" data-pltdoc="x">path-&gt;relative-string/library</a></span>, for backward
compatibility.</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><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._setup/path-to-relative..rkt)._make-path-~3erelative-string))"></a><span title="Provided from: setup/path-to-relative | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._setup%2Fpath-to-relative..rkt%29._make-path-~3erelative-string%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-path-&gt;relative-string</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">dirs</span><span class="hspace">&nbsp;</span>[<span class="RktVar">default</span>]<span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<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=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="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></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=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></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=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">dirs</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></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=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._cons%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">cons</a></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=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></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%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path?</a></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=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="RktPn">)</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">default</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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></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=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></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="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></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=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</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="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=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">if</a></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=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path?</a></span><span class="hspace">&nbsp;</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=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path-%7E3estring%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">path-&gt;string</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">This function produces functions like
<span class="RktSym"><a href="#%28def._%28%28lib._setup%2Fpath-to-relative..rkt%29._path-~3erelative-string%2Flibrary%29%29" class="RktValLink" data-pltdoc="x">path-&gt;relative-string/library</a></span> and
<span class="RktSym"><a href="#%28def._%28%28lib._setup%2Fpath-to-relative..rkt%29._path-~3erelative-string%2Fsetup%29%29" class="RktValLink" data-pltdoc="x">path-&gt;relative-string/setup</a></span>.</div></p><p>The <span class="RktVar">dirs</span> argument determines the prefix substitutions.  It must be an
association list mapping a path-producing thunk to a prefix string for
paths in the specified path.</p><p><span class="RktVar">default</span> determines the default for the resulting function
(which can always be overridden by an additional argument to this
function).</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="getinfo.html" title="backward to &quot;6.8 API for Reading &quot;info.rkt&quot; Files&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="setup.html" title="up to &quot;6 raco setup: Installation Management&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="collection-names.html" title="forward to &quot;6.10 API for Collection Names&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>