anchor.diff:    (nix:stat-size (nix:fstat (input-handle-of device))))
   
   (defun open-file (filename &key (direction :input)
  -                  (if-exists nil if-exists-p)
  -                  (if-does-not-exist nil if-does-not-exist-p)
  +                  (if-exists :default if-exists-p)
  +                  (if-does-not-exist :default if-does-not-exist-p)
                     truncate append nonblocking (extra-flags 0) (mode #o666))
  +  (when (and (null if-exists)
  +             (null if-does-not-exist))
  +    (error 'program-error))
     (handler-case
         (make-instance 'file-device
                        :filename (namestring filename)
                        :direction direction
  -                     :if-exists (if (and if-exists-p (null if-exists))
  -                                    :error if-exists)
  -                     :if-does-not-exist (if (and if-does-not-exist
  -                                                 (null if-does-not-exist-p))
  -                                            :error if-does-not-exist)
  +                     :if-exists if-exists
  +                     :if-does-not-exist if-does-not-exist
                        :truncate truncate
                        :append append
                        :nonblocking nonblocking
  
positive.code:   '(member :input :output :io))
  
  (deftype file-if-exists ()
    '(member :error :error-if-symlink :unlink :overwrite))
  
  (deftype file-if-does-not-exist ()
    '(member :error :create))
  
  (defmethod initialize-instance :after ((device file-device)
                                         &key filename (direction :input)
                                         if-exists if-does-not-exist truncate append
                                         nonblocking (extra-flags 0) (mode #o666))
    (when (and (eql :error if-exists)
               (eql :error if-does-not-exist))
      (error 'program-error))
  
negative.code: (defmethod device-position ((device file-device))
    (position-of device))
  
  (defmethod (setf device-position) (offset (device file-device) &key (from :start))
    (ecase from
      (:start
       (nix:lseek (input-handle-of device) offset nix:seek-set)
       (setf (position-of device) offset))
  