Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 4913

Macaulay2-1.3.1-8.fc15.i686.rpm

<?xml version="1.0" encoding="utf-8" ?>  <!-- for emacs: -*- coding: utf-8 -*- -->
<!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"	 "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>prefixPath -- absolute locations of Macaulay2 files</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="_preimage.html">next</a> | <a href="_precision.html">previous</a> | <a href="_preimage.html">forward</a> | <a href="_precision.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div>

    </td>
  </tr>
</table>
<hr/>
<div><h1>prefixPath -- absolute locations of Macaulay2 files</h1>
<div class="single"><h2>Description</h2>
<div><p>The absolute location of a Macaulay2 file can be obtained by concatenating three components: (a) the prefix, which is one of the members of the list <a href="_prefix__Path.html" title="absolute locations of Macaulay2 files">prefixPath</a>; (b) the relative location of the directory containing the file, as recorded in the hash table <a href="_current__Layout.html" title="relative locations of Macaulay2 files">Layout</a>; and (c) the base name of the file.  The value of <a href="_prefix__Path.html" title="absolute locations of Macaulay2 files">prefixPath</a> is used by <a href="_install__Package.html" title="load and install a package and its documentation ">installPackage</a> when determining how to direct documentation hyperlinks from one package to another, provided the option <a href="___Absolute__Links.html" title="name for an optional argument">AbsoluteLinks</a> is set to <a href="_true.html" title="">true</a>.</p>
<p>The initial value of <a href="_prefix__Path.html" title="absolute locations of Macaulay2 files">prefixPath</a> contains just the following two optional items.  If the variable <a href="_prefix__Directory.html" title="the prefix directory">prefixDirectory</a> was given a non-null value initially or by a <tt>-e</tt> command line argument, then it will be the last element of <a href="_prefix__Path.html" title="absolute locations of Macaulay2 files">prefixPath</a>.  If the <tt>-q</tt> option was not given on the command line used to invoke Macaulay2, then the value of <tt>applicationDirectory()|"local/"</tt> will be the first element of <a href="_prefix__Path.html" title="absolute locations of Macaulay2 files">prefixPath</a>.  No attempt is made to synchronize the value of <a href="_prefix__Path.html" title="absolute locations of Macaulay2 files">prefixPath</a> with the values of <a href="_prefix__Directory.html" title="the prefix directory">prefixDirectory</a> and of <tt>applicationDirectory()</tt>, which may change.</p>
<p>When running a newly compiled version of Macaulay2, adding something like <tt>-E 'prefixDirectory="/usr/"'</tt> to the command line is a good way to direct hyperlinks created by <a href="_install__Package.html" title="load and install a package and its documentation ">installPackage</a> to the documentation provided by an older copy of Macaulay2 installed with the prefix <tt>/usr/</tt>, and that, in turn, is easily done within emacs by the keystroke sequence <tt>CTRL-U f12</tt>, which offers you a chance to edit the command line.</p>
<p>The initial value of <a href="_prefix__Path.html" title="absolute locations of Macaulay2 files">prefixPath</a> described above can be overridden by the user's <a href="_initialization_spfile.html" title="">initialization file</a>).</p>
<p>The list <a href="_prefix__Path.html" title="absolute locations of Macaulay2 files">prefixPath</a> should be distinguished from the list <a href="_path.html" title="list of directories to look in">path</a>, which is used to locate files to be loaded, by functions such as <a href="_search__Path_lp__List_cm__String_rp.html" title="search a path for a file">searchPath</a>, <a href="_load.html" title="read Macaulay2 commands">load</a>, <a href="_load__Package.html" title="load a package">loadPackage</a>, and <a href="_needs__Package.html" title="load a package if not already loaded">needsPackage</a>.</p>
<p>The following example shows the list of places where we might find the source code of a package called <tt>Foo</tt> after it has been installed by <a href="_install__Package.html" title="load and install a package and its documentation ">installPackage</a>.</p>
<table class="examples"><tr><td><pre>i1 : stack apply(prefixPath, p -> p | Layout#1#"packages" | "Foo.m2")

o1 = /builddir/build/BUILD/Macaulay2-1.3.1-r10737/StagingArea/
     /builddir/build/BUILD/Macaulay2-1.3.1-r10737/StagingArea/
     /builddir/build/BUILD/Macaulay2-1.3.1-r10737/StagingArea/
     ------------------------------------------------------------------------
     common/share/Macaulay2/Foo.m2
     share/Macaulay2/Foo.m2
     i686-Linux-Fedora-15/share/Macaulay2/Foo.m2</pre>
</td></tr>
</table>
<p>This example shows the list of places where we might reasonably find the html file documenting a function named <tt>bar</tt> in a package called <tt>Foo</tt>.</p>
<table class="examples"><tr><td><pre>i2 : stack apply(prefixPath, p -> p | replace("PKG","Foo",Layout#1#"packagehtml") | "bar.html")

o2 = /builddir/build/BUILD/Macaulay2-1.3.1-r10737/StagingArea/
     /builddir/build/BUILD/Macaulay2-1.3.1-r10737/StagingArea/
     /builddir/build/BUILD/Macaulay2-1.3.1-r10737/StagingArea/
     ------------------------------------------------------------------------
     common/share/doc/Macaulay2/Foo/html/bar.html
     share/doc/Macaulay2/Foo/html/bar.html
     i686-Linux-Fedora-15/share/doc/Macaulay2/Foo/html/bar.html</pre>
</td></tr>
</table>
<p>This example shows the list of places where we might reasonably find the info file documenting a package called <tt>Foo</tt>.</p>
<table class="examples"><tr><td><pre>i3 : stack apply(prefixPath, p -> p | Layout#1#"info" | "Foo.info")

o3 = /builddir/build/BUILD/Macaulay2-1.3.1-r10737/StagingArea/
     /builddir/build/BUILD/Macaulay2-1.3.1-r10737/StagingArea/
     /builddir/build/BUILD/Macaulay2-1.3.1-r10737/StagingArea/
     ------------------------------------------------------------------------
     common/share/info/Foo.info
     share/info/Foo.info
     i686-Linux-Fedora-15/share/info/Foo.info</pre>
</td></tr>
</table>
</div>
</div>
<div class="single"><h2>See also</h2>
<ul><li><span><a href="_command__Line.html" title="the command line arguments">commandLine</a> -- the command line arguments</span></li>
<li><span><a href="___Invoking_spthe_spprogram.html" title="">Invoking the program</a></span></li>
<li><span><a href="_application__Directory.html" title="the path to the user's application directory">applicationDirectory</a> -- the path to the user's application directory</span></li>
<li><span><a href="_prefix__Directory.html" title="the prefix directory">prefixDirectory</a> -- the prefix directory</span></li>
<li><span><a href="_path.html" title="list of directories to look in">path</a> -- list of directories to look in</span></li>
<li><span><a href="_search__Path_lp__List_cm__String_rp.html" title="search a path for a file">searchPath</a> -- search a path for a file</span></li>
<li><span><a href="_load.html" title="read Macaulay2 commands">load</a> -- read Macaulay2 commands</span></li>
<li><span><a href="_load__Package.html" title="load a package">loadPackage</a> -- load a package</span></li>
<li><span><a href="_needs__Package.html" title="load a package if not already loaded">needsPackage</a> -- load a package if not already loaded</span></li>
</ul>
</div>
<div class="waystouse"><h2>For the programmer</h2>
<p>The object <a href="_prefix__Path.html" title="absolute locations of Macaulay2 files">prefixPath</a> is <span>a <a href="___List.html">list</a></span>.</p>
</div>
</div>
</body>
</html>