Index: /branches/working-0711/ccl/level-1/l1-files.lisp
===================================================================
--- /branches/working-0711/ccl/level-1/l1-files.lisp	(revision 8218)
+++ /branches/working-0711/ccl/level-1/l1-files.lisp	(revision 8219)
@@ -193,10 +193,17 @@
   (when (directory-pathname-p path)
     (return-from %create-file (probe-file-x path)))
-  (assert (or (eql if-exists :overwrite) (not (probe-file path))) ()
+  (assert (or (eql if-exists :overwrite)
+              (null if-exists)
+              (not (probe-file path))) ()
 	  "~s ~s not implemented yet" :if-exists if-exists)
   (let* ((unix-name (native-translated-namestring path))
-	 (fd (fd-open unix-name (logior #$O_WRONLY #$O_CREAT #$O_TRUNC))))
+	 (fd (fd-open unix-name (logior #$O_WRONLY #$O_CREAT #$O_TRUNC
+                                        (if (null if-exists)
+                                          #$O_EXCL
+                                          0)))))
     (if (< fd 0)
-      (signal-file-error fd path)
+      (if (eql fd (- #$EEXIST))         ;#$O_EXCL was set and file existed
+        (return-from %create-file nil)
+        (signal-file-error fd path))
       (fd-close fd))
     (%realpath unix-name)))
