Move `file-exists?' into the pathname code since it is strongly
authorChris Hanson <org/chris-hanson/cph>
Thu, 20 Aug 1987 03:06:21 +0000 (03:06 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 20 Aug 1987 03:06:21 +0000 (03:06 +0000)
related to that.

v7/src/runtime/sfile.scm

index 6389664192393c781e9e54d2f5aec04ccce74328..e514be2f05895e4a32dfd8ab6305140f801fb97a 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/sfile.scm,v 13.41 1987/01/23 00:19:51 jinx Rel $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/sfile.scm,v 13.42 1987/08/20 03:06:21 cph Rel $
 ;;;
 ;;;    Copyright (c) 1987 Massachusetts Institute of Technology
 ;;;
@@ -20,9 +20,9 @@
 ;;;    future releases; and (b) to inform MIT of noteworthy uses of
 ;;;    this software.
 ;;;
-;;;    3.  All materials developed as a consequence of the use of
-;;;    this software shall duly acknowledge such use, in accordance
-;;;    with the usual standards of acknowledging credit in academic
+;;;    3. All materials developed as a consequence of the use of this
+;;;    software shall duly acknowledge such use, in accordance with
+;;;    the usual standards of acknowledging credit in academic
 ;;;    research.
 ;;;
 ;;;    4. MIT has made no warrantee or representation that the
@@ -30,7 +30,7 @@
 ;;;    under no obligation to provide any services, by way of
 ;;;    maintenance, update, or otherwise.
 ;;;
-;;;    5.  In conjunction with products arising from the use of this
+;;;    5. In conjunction with products arising from the use of this
 ;;;    material, there shall be no use of the name of the
 ;;;    Massachusetts Institute of Technology nor of any adaptation
 ;;;    thereof in any advertising, promotional, or sales literature
 (define delete-file
   (let ((p-delete-file (make-primitive-procedure 'REMOVE-FILE)))
     (named-lambda (delete-file name)
-      (p-delete-file (canonicalize-input-filename name)))))
-
-(define file-exists?
-  (let ((p-file-exists? (make-primitive-procedure 'FILE-EXISTS?)))
-    (named-lambda (file-exists? name)
-      (let ((pathname (->pathname name)))
-       (if (eq? 'NEWEST (pathname-version pathname))
-           (pathname-newest pathname)
-           (p-file-exists?
-            (pathname->string (pathname->absolute-pathname pathname))))))))
+      (p-delete-file (canonicalize-input-filename name)))))
\ No newline at end of file