anchor.diff:  (defmethod sys.gray:stream-element-type ((stream fat32-file-character-stream))
     'character)
   
  +;; WIP
  +;; TODO resize to files bigger than 1 cluster
   (defmethod sys.gray:stream-write-byte ((stream fat32-file-stream) byte)
     (assert (member (direction stream) '(:output :io)))
     (when (> (buffer-offset stream)
  
positive.code:           (read-buffer-size 0)
            (created-file nil)
            (abort-action nil))
  
        (multiple-value-bind (cluster cluster-sector start) (find-file host pathname)
          (if start
              (progn (setf buffer (read-file (fat32-structure host)
                                             (partition host)
                                             (read-first-cluster cluster start)
                                             (fat host))
                           read-buffer-position (read-first-cluster cluster start)
                           read-buffer-size (read-size cluster start)))
              (ecase if-does-not-exist
                (:error (error 'simple-file-error
                               :pathname pathname
                               :format-control "File ~A does not exist. ~S"
                               :format-arguments (list pathname (pathname-name pathname))))
                (:create (setf created-file t
                               abort-action :delete)
                 (error "Feature :create not implemented for :if-does-not-exist")))))
  
        (when (and (not created-file) (member direction '(:output :io)))
          (ecase if-exists
            (:error (error 'simple-file-error
  
negative.code:     array))
  
  (defun write-sector (disk sector array n)
    "Write n sectors to disk"
    (multiple-value-bind (successp error-reason) (mezzano.supervisor:disk-write disk sector n array)
      (when (not successp)
        (error "Disk write error: ~S" error-reason))))
  
  (defun read-cluster (fat32 disk cluster-sector)
    "Read cluster data from disk"
    (let* ((spc (fat32-sectors-per-cluster fat32))
           (cluster-data (make-array (* spc (mezzano.supervisor:disk-sector-size disk))
                                     :area :wired :element-type '(unsigned-byte 8))))
      (multiple-value-bind (successp error-reason) (mezzano.supervisor:disk-read disk cluster-sector spc cluster-data)
        (when (not successp)
          (error "Disk read error: ~S" error-reason)))
      cluster-data))
  
  (defun write-cluster (disk cluster-sector fat32 cluster-data)
    "Write cluster data to disk"
    (multiple-value-bind (successp error-reason)
        (mezzano.supervisor:disk-write disk cluster-sector (fat32-sectors-per-cluster fat32)
                                       (make-array (length cluster-data)
                                                   :area :wired :element-type '(unsigned-byte 8)
                                                   :initial-contents cluster-data))
      (when (not successp)
        (error "Disk write error: ~S" error-reason))))
  
  ;;; bit offsets
  (defconstant +attribute-read-only+ 0)
  