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

258 lines
No EOL
5.2 KiB
HTML

<!DOCTYPE HTML>
<HTML LANG="en-us"
><HEAD
><TITLE
>file-write-date | Common Lisp Nova Spec</TITLE
><META CHARSET="US-ASCII"
><LINK REL="canonical" HREF="f_file-write-date.html"
><LINK REL="next" HREF="f_rename-file.html" TYPE="text/html" TITLE="rename-file"
><LINK REL="prev" HREF="f_file-author.html" TYPE="text/html" TITLE="file-author"
><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_file-write-date.html"
>file-write-date</A
></SPAN
></DIV
><DIV CLASS="apropos"
><DIV CLASS="apropos-io"
><A HREF="f_file-author.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_rename-file.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="file-write-date"
></SPAN
><B
>file-write-date</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
>file-write-date</B
> <SPAN CLASS="cmssi"
>pathspec</SPAN
> <SPAN CLASS="arrow"
>&#8594;</SPAN
> <SPAN CLASS="cmssi"
>date</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"
>date</VAR
> &#8212; a <A HREF="26_1_Glossary.html#universal_time"
><EM CLASS="term"
>universal time</EM
></A
> or <SPAN CLASS="misc"
><B
>nil</B
></SPAN
>.</P
></DD
><DT
><B
>Description</B
></DT
><DD
><P CLASS="j"
>Returns a <A HREF="26_1_Glossary.html#universal_time"
><EM CLASS="term"
>universal time</EM
></A
> representing the time at which the <A HREF="26_1_Glossary.html#file"
><EM CLASS="term"
>file</EM
></A
> specified by <VAR CLASS="param"
>pathspec</VAR
> was last written (or created), or returns <SPAN CLASS="misc"
><B
>nil</B
></SPAN
> if such a time cannot be determined.</P
></DD
><DT
><B
>Examples</B
></DT
><DD
><PRE CLASS="screen"
> (with-open-file (s "noel.text"
:direction :output :if-exists :error)
(format s "~&amp;Dear Santa,~2%I was good this year. ~
Please leave lots of toys.~2%Love, Sue~
~2%attachments: milk, cookies~%")
(truename s))
<SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> #P"CUPID:/susan/noel.text"
(with-open-file (s "noel.text")
(file-write-date s))
<SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> 2902600800</PRE
></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="25_1_The_External_Environment.html#sec_25_1_4_2" CLASS="secref"
><SPAN CLASS="cmr"
>Section</SPAN
> <SPAN CLASS="cmr"
>25.1.4.2</SPAN
> <SPAN CLASS="cmr"
>(Universal</SPAN
> <SPAN CLASS="cmr"
>Time)</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_file-author.html" CLASS="prev"
>&#8592;</A
><A HREF="f_rename-file.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
>