User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cl:functions:probe-file [2019/07/14 17:00]
cl:functions:probe-file [2019/09/20 06:00] (current)
Line 1: Line 1:
 +====== Function PROBE-FILE ======
 +
 +====Syntax====
 +  * **probe-file** //​pathspec//​ → //​truename//​
 +
 +====Arguments and Values====
 +  * //​pathspec//​ - a //​[[CL:​Glossary:​pathname designator]]//​.
 +  * //​truename//​ - a //​[[CL:​Glossary:​physical pathname]]//​ or **[[CL:​Constant Variables:​nil]]**.
 +
 +====Description====
 +**probe-file** tests whether a file exists.
 +
 +**probe-file** returns //​[[CL:​Glossary:​false]]//​ if there is no file named //​pathspec//,​ and otherwise returns the //​[[CL:​Glossary:​truename]]//​ of //​pathspec//​.
 +
 +If the //​pathspec//​ //​[[CL:​Glossary:​designator]]//​ is an open //​[[CL:​Glossary:​stream]]//,​ then **probe-file** produces the //​[[CL:​Glossary:​truename]]//​ of its associated //​[[CL:​Glossary:​file]]//​.
 +
 +If //​pathspec//​ is a //​[[CL:​Glossary:​stream]]//,​ whether open or closed, it is coerced to a //​[[CL:​Glossary:​pathname]]//​ as if by the function **[[CL:​Functions:​pathname]]**.
 +
 +====Examples====
 +None.
 +
 +====Affected By====
 +The host computer'​s file system.
 +
 +====Exceptional Situations====
 +An error of type **[[CL:​Types:​file-error]]** is signaled if //​pathspec//​ is //​[[CL:​Glossary:​wild]]//​.
 +
 +An error of type **[[CL:​Types:​file-error]]** is signaled if the //​[[CL:​Glossary:​file system]]// cannot perform the requested operation.
 +
 +====See Also====
 +**[[CL:​Functions:​truename|Function TRUENAME]]**,​ **[[CL:​Functions:​open|Function OPEN]]**, **[[CL:​Functions:​ensure-directories-exist|Function ENSURE-DIRECTORIES-EXIST]]**,​ **[[CL:​Types:​pathname|System Class PATHNAME]]**,​ **[[CL:​Types:​logical-pathname|System Class LOGICAL-PATHNAME]]**,​{\secref\FileSystemConcepts},​ {\secref\OpenAndClosedStreams},​ {\secref\PathnamesAsFilenames}
 +
 +====Notes====
 +None.
 +
 +\issue{PATHNAME-LOGICAL:​ADD} \issue{PATHNAME-LOGICAL:​ADD} \issue{CLOSED-STREAM-FUNCTIONS:​ALLOW-INQUIRY} \issue{FILE-OPEN-ERROR:​SIGNAL-FILE-ERROR} \issue{PATHNAME-WILD:​NEW-FUNCTIONS} \issue{FILE-OPEN-ERROR:​SIGNAL-FILE-ERROR} \issue{PATHNAME-LOGICAL:​ADD} \issue{FILE-OPEN-ERROR:​SIGNAL-FILE-ERROR}