anchor.diff:             :pathname pathname
              :format-control "Cannot open directories for output."))
     (with-host-locked (host)
  -    (let ((dir (do ((element (rest (pathname-directory pathname)) (cdr element))
  -                    (dir (local-host-root host)))
  -                   ((endp element)
  -                    dir)
  -                 (let ((next (read-directory-entry dir (car element) "directory")))
  -                   (when (not next)
  -                     (error 'simple-file-error
  -                            :pathname pathname
  -                            :format-control "Subdirectory ~S does not exist."
  -                            :format-arguments (list element)))
  -                   (setf dir next)))))
  -      (let ((file (read-directory-entry dir (pathname-name pathname) (pathname-type pathname) (pathname-version pathname)))
  -            (createdp nil))
  -        (when (not file)
  -          (ecase if-does-not-exist
  -            (:error (error 'simple-file-error
  -                           :pathname pathname
  -                           :format-control "File ~A does not exist."
  -                           :format-arguments (list pathname)))
  -            (:create
  -             (setf file (make-file dir pathname element-type)
  -                   createdp t))
  -            ((nil) (return-from open-using-host nil))))
  -        (when (and (not createdp)
  -                   (member direction '(:output :io)))
  -          (ecase if-exists
  -            (:error (error 'simple-file-error
  -                           :pathname pathname
  -                           :format-control "File ~A exists."
  -                           :format-arguments (list pathname)))
  -            (:new-version
  -             (setf file (make-file dir
  -                                   (make-pathname :version :newest
  -                                                  :defaults pathname)
  -                                   element-type)))
  -            (:rename
  -             ???)
  -            (:rename-and-delete
  -             ???)
  -            (:supersede
  -             ???)
  -            ((:overwrite :append)
  -             ???)
  -            ((nil) (return-from open-using-host nil))))
  -        (when (and (not (eql direction :probe))
  -                   (not (equal (upgraded-array-element-type element-type)
  -                               (array-element-type (file-storage file)))))
  -          (error "Incompatible ELEMENT-TYPE. File is of type ~S."
  -                 (array-element-type (file-storage file))))
  -        (make-instance 'local-stream
  -                       :file file
  -                       :pathname pathname
  -                       :position (if (and (member direction '(:output :io))
  -                                          (eql if-exists :append))
  -                                     (length (file-storage file))
  -                                     0)
  -                       :direction direction)))))
  +    (let* ((dir (do ((element (rest (pathname-directory pathname)) (cdr element))
  +                     (dir (local-host-root host)))
  +                    ((endp element)
  +                     dir)
  +                  (let ((next (read-directory-entry dir (car element) "directory")))
  +                    (when (not next)
  +                      (error 'simple-file-error
  +                             :pathname pathname
  +                             :format-control "Subdirectory ~S does not exist."
  +                             :format-arguments (list element)))
  +                    (setf dir next))))
  +           (file (read-directory-entry dir (pathname-name pathname) (pathname-type pathname) (pathname-version pathname)))
  +           (createdp nil)
  +           (superseded-file nil))
  +      (when (not file)
  +        (ecase if-does-not-exist
  +          (:error (error 'simple-file-error
  +                         :pathname pathname
  +                         :format-control "File ~A does not exist."
  +                         :format-arguments (list pathname)))
  +          (:create
  +           (setf file (make-file dir pathname element-type)
  +                 createdp t))
  +          ((nil) (return-from open-using-host nil))))
  +      (when (and (not createdp)
  +                 (member direction '(:output :io)))
  +        (ecase if-exists
  +          (:error (error 'simple-file-error
  +                         :pathname pathname
  +                         :format-control "File ~A exists."
  +                         :format-arguments (list pathname)))
  +          (:new-version
  +           (setf file (make-file dir
  +                                 (make-pathname :version :newest
  +                                                :defaults pathname)
  +                                 element-type)))
  +          (:rename
  +           ???)
  +          (:rename-and-delete
  +           ???)
  +          (:supersede
  +           (setf superseded-file file
  +                 file (make-instance 'local-file
  +                                     :truename (file-truename file)
  +                                     :storage (make-array 0 :element-type element-type :adjustable t :fill-pointer 0))))
  +          ((:overwrite :append)
  +           ???)
  +          ((nil) (return-from open-using-host nil))))
  +      (when (and (not (eql direction :probe))
  +                 (not (equal (upgraded-array-element-type element-type)
  +                             (array-element-type (file-storage file)))))
  +        (error "Incompatible ELEMENT-TYPE. File is of type ~S."
  +               (array-element-type (file-storage file))))
  +      (make-instance 'local-stream
  +                     :file file
  +                     :pathname pathname
  +                     :position (if (and (member direction '(:output :io))
  +                                        (eql if-exists :append))
  +                                   (length (file-storage file))
  +                                   0)
  +                     :direction direction
  +                     :superseded-file superseded-file))))
   
   (defmethod file-write-date-using-host ((host local-file-host) pathname)
     (when (not (typep (pathname-directory pathname) '(cons (eql :absolute))))
  
positive.code:                      :lock (mezzano.supervisor:make-mutex "Local File lock")))
  
  (defclass local-stream (file-stream sys.gray:fundamental-stream sys.gray:unread-char-mixin)
    ((file :initarg :file :reader local-stream-file)
     (pathname :initarg :pathname :reader file-stream-pathname)
     (position :initarg :position :accessor stream-position)
     (direction :initarg :direction :reader direction)))
  
  (defmacro with-host-locked ((host) &body body)
    `(mezzano.supervisor:with-mutex ((local-host-lock ,host))
  
negative.code: (defvar *illegal-characters* ".<>\\/")
  
  (defclass local-file-host ()
    ((%name :initarg :name :reader host-name)
     (%root :reader local-host-root)
     (%lock :initarg :lock :reader local-host-lock))
    (:default-initargs :lock (mezzano.supervisor:make-mutex "Local File Host lock")))
  
  (defmethod initialize-instance :after ((instance local-file-host) &key &allow-other-keys)
  