1
0
Fork 0
cl-sites/novaspec.org/cl/f_probe-file.html
2025-02-05 18:52:26 +01:00

319 lines
No EOL
6.3 KiB
HTML

<!DOCTYPE HTML>
<HTML LANG="en-us"
><HEAD
><TITLE
>probe-file | Common Lisp Nova Spec</TITLE
><META CHARSET="US-ASCII"
><LINK REL="canonical" HREF="f_probe-file.html"
><LINK REL="next" HREF="f_ensure-directories-exist.html" TYPE="text/html" TITLE="ensure-directories-exist"
><LINK REL="prev" HREF="f_directory.html" TYPE="text/html" TITLE="directory"
><LINK REL="up" HREF="20_2_Files_Dictionary.html" TYPE="text/html" TITLE="20.2 Files Dictionary"
><LINK REL="start" HREF="index.html" TYPE="text/html" TITLE="Common Lisp Nova Spec"
><META NAME="VIEWPORT" CONTENT="width=device-width, initial-scale=1.0"
><LINK REL="STYLESHEET" HREF="dpans.css%3F3909942064.css"
><SCRIPT SRC="dpans.js%3F3909942064"
></SCRIPT
><SCRIPT SRC="apropos.js%3F3909942064"
></SCRIPT
></HEAD
><BODY
><DIV
><DIV CLASS="topnav"
><DIV CLASS="breadcrumb"
><SPAN CLASS="breadcrumb-item"
><A HREF="index.html"
>Common Lisp Nova Spec</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="20_Files.html"
>20. Files</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="20_2_Files_Dictionary.html"
>20.2 Files Dictionary</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="f_probe-file.html"
>probe-file</A
></SPAN
></DIV
><DIV CLASS="apropos"
><DIV CLASS="apropos-io"
><A HREF="f_directory.html" CLASS="prev"
>&#8592;</A
><SPAN ID="apropos-label"
>Apropos </SPAN
><INPUT ID="apropos" AUTOFOCUS="AUTOFOCUS" PLACEHOLDER="Type here to search" ONINPUT="aproposInput(this);" ONKEYUP="aproposKeyup(event);" ONCHANGE="aproposChange(this);" ONFOCUS="aproposFocus(this);" ONFOCUSOUT="aproposFocusout(this);"
><A HREF="f_ensure-directories-exist.html" CLASS="next"
>&#8594;</A
></DIV
><DIV ID="apropos-res"
></DIV
></DIV
></DIV
><DIV CLASS="matter"
><DIV CLASS="com"
><DIV CLASS="begincom"
><HR
><TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0"
><TR
><TD ALIGN="LEFT" VALIGN="BASELINE" WIDTH="100%" CLASS="name"
><SPAN CLASS="idx" DATA-KIND="idxref" DATA-TERM="probe-file"
></SPAN
><B
>probe-file</B
></TD
><TD ALIGN="RIGHT" VALIGN="BASELINE" WIDTH="0" NOWRAP="NOWRAP" CLASS="ftype"
><I
>Function</I
></TD
></TR
></TABLE
><HR
></DIV
><UL CLASS="subtoc"
></UL
><DL
><DT
><B
>Syntax</B
></DT
><DD
><P CLASS="j"
><B
>probe-file</B
> <SPAN CLASS="cmssi"
>pathspec</SPAN
> <SPAN CLASS="arrow"
>&#8594;</SPAN
> <SPAN CLASS="cmssi"
>truename</SPAN
></P
></DD
><DT
><B
>Arguments and Values</B
></DT
><DD
><P CLASS="j"
><VAR CLASS="param"
>pathspec</VAR
> &#8212; a <A HREF="26_1_Glossary.html#pathname_designator"
><EM CLASS="term"
>pathname designator</EM
></A
>. </P
><P CLASS="j"
><VAR CLASS="param"
>truename</VAR
> &#8212; a <A HREF="26_1_Glossary.html#physical_pathname"
><EM CLASS="term"
>physical pathname</EM
></A
> or <SPAN CLASS="misc"
><B
>nil</B
></SPAN
>.</P
></DD
><DT
><B
>Description</B
></DT
><DD
><P CLASS="j"
><A HREF="f_probe-file.html" CLASS="funref"
><B
>probe-file</B
></A
> tests whether a file exists. </P
><P CLASS="j"
><A HREF="f_probe-file.html" CLASS="funref"
><B
>probe-file</B
></A
> returns <A HREF="26_1_Glossary.html#false"
><EM CLASS="term"
>false</EM
></A
> if there is no file named <VAR CLASS="param"
>pathspec</VAR
>, and otherwise returns the <A HREF="26_1_Glossary.html#truename"
><EM CLASS="term"
>truename</EM
></A
> of <VAR CLASS="param"
>pathspec</VAR
>. </P
><P CLASS="j"
>If the <VAR CLASS="param"
>pathspec</VAR
> <A HREF="26_1_Glossary.html#designator"
><EM CLASS="term"
>designator</EM
></A
> is an open <A HREF="26_1_Glossary.html#stream"
><EM CLASS="term"
>stream</EM
></A
>, then <A HREF="f_probe-file.html" CLASS="funref"
><B
>probe-file</B
></A
> produces the <A HREF="26_1_Glossary.html#truename"
><EM CLASS="term"
>truename</EM
></A
> of its associated <A HREF="26_1_Glossary.html#file"
><EM CLASS="term"
>file</EM
></A
>. If <VAR CLASS="param"
>pathspec</VAR
> is a <A HREF="26_1_Glossary.html#stream"
><EM CLASS="term"
>stream</EM
></A
>, whether open or closed, it is coerced to a <A HREF="26_1_Glossary.html#pathname"
><EM CLASS="term"
>pathname</EM
></A
> as if by the <A HREF="26_1_Glossary.html#function"
><EM CLASS="term"
>function</EM
></A
> <A HREF="f_pathname.html" CLASS="funref"
><B
>pathname</B
></A
>.</P
></DD
><DT
><B
>Affected By</B
></DT
><DD
><P CLASS="j"
>The host computer&#8217;s file system.</P
></DD
><DT
><B
>Exceptional Situations</B
></DT
><DD
><P CLASS="j"
>An error of <A HREF="26_1_Glossary.html#type"
><EM CLASS="term"
>type</EM
></A
> <A HREF="t_file-error.html" CLASS="typeref"
><B
>file-error</B
></A
> is signaled if <VAR CLASS="param"
>pathspec</VAR
> is <A HREF="26_1_Glossary.html#wild"
><EM CLASS="term"
>wild</EM
></A
>. </P
><P CLASS="j"
>An error of <A HREF="26_1_Glossary.html#type"
><EM CLASS="term"
>type</EM
></A
> <A HREF="t_file-error.html" CLASS="typeref"
><B
>file-error</B
></A
> is signaled if the <A HREF="26_1_Glossary.html#file_system"
><EM CLASS="term"
>file system</EM
></A
> cannot perform the requested operation.</P
></DD
><DT
><B
>See Also</B
></DT
><DD
><P CLASS="j"
><A HREF="f_truename.html" CLASS="funref"
><B
>truename</B
></A
>, <A HREF="f_open.html" CLASS="funref"
><B
>open</B
></A
>, <A HREF="f_ensure-directories-exist.html" CLASS="funref"
><B
>ensure-directories-exist</B
></A
>, <A HREF="t_pathname.html" CLASS="typeref"
><B
>pathname</B
></A
>, <A HREF="t_logical-pathname.html" CLASS="typeref"
><B
>logical-pathname</B
></A
>, <A HREF="20_1_File_System_Concepts.html#sec_20_1" CLASS="secref"
><SPAN CLASS="cmr"
>Section</SPAN
> <SPAN CLASS="cmr"
>20.1</SPAN
> <SPAN CLASS="cmr"
>(File</SPAN
> <SPAN CLASS="cmr"
>System</SPAN
> <SPAN CLASS="cmr"
>Concepts)</SPAN
></A
>, <A HREF="21_1_Stream_Concepts.html#sec_21_1_1_1_2" CLASS="secref"
><SPAN CLASS="cmr"
>Section</SPAN
> <SPAN CLASS="cmr"
>21.1.1.1.2</SPAN
> <SPAN CLASS="cmr"
>(Open</SPAN
> <SPAN CLASS="cmr"
>and</SPAN
> <SPAN CLASS="cmr"
>Closed</SPAN
> <SPAN CLASS="cmr"
>Streams)</SPAN
></A
>, <A HREF="19_1_Overview_of_Filenames.html#sec_19_1_2" CLASS="secref"
><SPAN CLASS="cmr"
>Section</SPAN
> <SPAN CLASS="cmr"
>19.1.2</SPAN
> <SPAN CLASS="cmr"
>(Pathnames</SPAN
> <SPAN CLASS="cmr"
>as</SPAN
> <SPAN CLASS="cmr"
>Filenames)</SPAN
></A
></P
></DD
></DL
></DIV
></DIV
><DIV CLASS="footer"
><DIV CLASS="btmnav"
><A HREF="f_directory.html" CLASS="prev"
>&#8592;</A
><A HREF="f_ensure-directories-exist.html" CLASS="next"
>&#8594;</A
></DIV
><DIV CLASS="trail"
>Conversion to HTML copyright 2023 by Gilbert Baumann</DIV
></DIV
></DIV
><SCRIPT
>domReady();</SCRIPT
></BODY
></HTML
>