(defun load-paip-file (file) "Load the binary file if it exists and is newer, else load the source." (let* ((src (paip-pathname file :lisp)) (src-date (file-write-date src)) (bin (paip-pathname file :binary)) (bin-date (file-write-date bin))) (load (if (and (probe-file bin) src-date bin-date (>= bin-date src-date)) bin src))))The copyright statement mentions 1991. Even though it may look strange to probe the "bin" file instead of just checking that bin-date is not nil, it seems his thinking when using that (pre-ANSI?) CL was that file-write-date would not lead to an error when the targeted file does not exist.
From: edgar <firstname.lastname@example.org>
To: Christian Wagner <email@example.com>
Cc: "firstname.lastname@example.org" <email@example.com>
Sent: Tuesday, 2 July 2013, 22:44
Subject: Re: [Sbcl-bugs] [SBLC 1.1.3] file-write-date failure when file does not exist
Am Tue, 2 Jul 2013 13:12:34 +0100 (BST)
schrieb Christian Wagner <firstname.lastname@example.org>:
> In SBLC 1.1.3 running on Mac OS/X 10.6.8 calling FILE-WRITE-DATE on a
> file which doesn't exist fails because of
> a SB-IMPL::SIMPLE-FILE-PERROR.
> Following LispWorks's CL HyperSpec
> I was expecting NIL to be returned.
Please read again
where is written:
An error of type file-error is signaled if the file system cannot
perform the requested operation.
The author of this email does not necessarily endorse the following
advertisements, which are the sole responsibility of the advertiser: