1
0
Fork 0
cl-sites/www.cs.cmu.edu/Groups/AI/html/cltl/clm/node203.html

89 lines
5.5 KiB
HTML
Raw Normal View History

2023-10-25 11:23:21 +02:00
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
<!Converted with LaTeX2HTML 0.6.5 (Tue Nov 15 1994) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
<HEAD>
<TITLE>23.1. File Names</TITLE>
</HEAD>
<BODY>
<meta name="description" value=" File Names">
<meta name="keywords" value="clm">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
<b>Common Lisp the Language, 2nd Edition</b>
<BR> <HR><A NAME=tex2html4084 HREF="node204.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html4082 HREF="node202.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html4076 HREF="node202.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html4086 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html4087 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html4085 HREF="node204.html"> Pathnames</A>
<B>Up:</B> <A NAME=tex2html4083 HREF="node202.html"> File System Interface</A>
<B> Previous:</B> <A NAME=tex2html4077 HREF="node202.html"> File System Interface</A>
<HR> <P>
<H1><A NAME=SECTION002710000000000000000>23.1. File Names</A></H1>
<P>
Common Lisp programs need to use names to designate files.
The main difficulty in dealing with names of files is that different
file systems have different naming formats for files.
For example, here is a table of several file systems (actually,
operating systems that provide file systems) and what equivalent
file names might look like for each one:
<pre>
System File Name
==================================================
TOPS-20 &lt;LISPIO&gt;FORMAT.FASL.13
TOPS-10 FORMAT.FAS[1,4]
ITS LISPIO;FORMAT FASL
MULTICS &gt;udd&gt;LispIO&gt;format.fasl
TENEX &lt;LISPIO&gt;FORMAT.FASL;13
VAX/VMS [LISPIO]FORMAT.FAS;13
UNIX /usr/lispio/format.fasl
==================================================
</pre>
It would be impossible for each program that deals with file names to
know about each different file name format that exists; a new Common Lisp
implementation might use a format different from any of its predecessors.
Therefore, Common Lisp provides <i>two</i> ways to represent file names:
<i>namestrings</i>, which are strings in the implementation-dependent form
customary for the file system, and <i>pathnames</i>, which are special abstract
data objects that represent file names in an implementation-independent
way. Functions are provided to convert between these two representations,
and all manipulations of files can be expressed in machine-independent
terms by using pathnames.
<P>
In order to allow Common Lisp programs to operate in a network environment
that may have more than one kind of file system, the pathname facility
allows a file name to specify which file system is to be used.
In this context, each file system is called a <i>host</i>, in keeping
with the usual networking terminology.
<P>
<img align=bottom alt="change_begin" src="gif/change_begin.gif"><br>
Different hosts may use different notations for file names.
Common Lisp allows customary notation to be used for each host, but
also supports
a system of logical pathnames that provides a standard framework for naming
files in a portable manner (see section <A HREF="node208.html#LOGICALPATHNAMESSECTION">23.1.5</A>).
<br><img align=bottom alt="change_end" src="gif/change_end.gif">
<P>
<HR>
<UL>
<LI> <A NAME=tex2html4088 HREF="node204.html#SECTION002711000000000000000"> Pathnames</A>
<LI> <A NAME=tex2html4089 HREF="node205.html#SECTION002712000000000000000"> Case Conventions</A>
<LI> <A NAME=tex2html4090 HREF="node206.html#SECTION002713000000000000000"> Structured Directories</A>
<LI> <A NAME=tex2html4091 HREF="node207.html#SECTION002714000000000000000"> Extended Wildcards</A>
<LI> <A NAME=tex2html4092 HREF="node208.html#SECTION002715000000000000000"> Logical Pathnames</A>
<UL>
<LI> <A NAME=tex2html4093 HREF="node209.html#SECTION002715100000000000000"> Syntax of Logical Pathname Namestrings</A>
<LI> <A NAME=tex2html4094 HREF="node210.html#SECTION002715200000000000000"> Parsing of Logical Pathname Namestrings</A>
<LI> <A NAME=tex2html4095 HREF="node211.html#SECTION002715300000000000000"> Using Logical Pathnames</A>
<LI> <A NAME=tex2html4096 HREF="node212.html#SECTION002715400000000000000"> Examples of the Use of Logical Pathnames</A>
<LI> <A NAME=tex2html4097 HREF="node213.html#SECTION002715500000000000000"> Discussion of Logical Pathnames</A>
</UL>
<LI> <A NAME=tex2html4098 HREF="node214.html#SECTION002716000000000000000"> Pathname Functions</A>
</UL>
<BR> <HR><A NAME=tex2html4084 HREF="node204.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html4082 HREF="node202.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html4076 HREF="node202.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html4086 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html4087 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html4085 HREF="node204.html"> Pathnames</A>
<B>Up:</B> <A NAME=tex2html4083 HREF="node202.html"> File System Interface</A>
<B> Previous:</B> <A NAME=tex2html4077 HREF="node202.html"> File System Interface</A>
<HR> <P>
<HR>
<P><ADDRESS>
AI.Repository@cs.cmu.edu
</ADDRESS>
</BODY>