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)
              (read-buffer-size stream))
       (setf (read-buffer-size stream)
             (buffer-offset stream)))
  +  (let ((array-size (array-dimension (read-buffer stream) 0)))
  +    (when (>= (buffer-offset stream) array-size)
  +      (let* ((host (host stream))
  +             (fat32 (fat32-structure host)))
  +        (setf (read-buffer stream) (adjust-array (read-buffer stream)
  +                                                 (+ array-size (bytes-per-cluster fat32))
  +                                                 :initial-element 0)))))
     (setf (aref (read-buffer stream)
                 (buffer-offset stream))
           byte)
  
positive.code:     (replace sequence (read-buffer stream) :start1 start :end1 end :start2 0 :end2 end2)
      end2))
  
  ;; WIP
  ;; TODO resize to files bigger than 1 cluster
  (defmethod sys.gray:stream-write-char ((stream fat32-file-character-stream) char)
    (assert (member (direction stream) '(:output :io)))
    (when (> (buffer-offset stream)
             (read-buffer-size stream))
      (setf (read-buffer-size stream)
            (buffer-offset stream)))
    (setf (aref (read-buffer stream)
                (buffer-offset stream))
          (char-code char))
  
negative.code:       (mezzano.supervisor:disk-read disk (first-sector-of-cluster fat32 cluster-n) spc temp-buf)
        (replace result temp-buf :start1 (* n-cluster spc sector-size)))))
  
  (defun write-file (fat32 disk start-cluster fat array)
    (let* ((spc (fat32-sectors-per-cluster fat32))
           (sector-size (mezzano.supervisor:disk-sector-size disk))
           (temp-buf (make-array (* spc sector-size) :element-type '(unsigned-byte 8) :area :wired)))
      (do ((cluster-n start-cluster (sys.int::ub32ref/le fat (ash cluster-n 2)))
           (last-cluster 0)
           (n-cluster 0 (1+ n-cluster)))
          ((>= cluster-n #x0FFFFFF8)
           (if (> (array-dimension array 0)
                  (* n-cluster spc sector-size))
               (do ((cluster-n (next-free-cluster fat) (next-free-cluster fat (1+ cluster-n)))
                    (i 0 (1+ i)))
                   ((= (array-dimension array 0)
                       (* (+ i n-cluster) spc sector-size))
                    (setf (sys.int::ub32ref/le fat (ash last-cluster 2)) #x0FFFFFFF)
                    (write-fat disk fat32 fat))
                 (replace temp-buf array :start2 (* (+ i n-cluster) spc sector-size))
                 (mezzano.supervisor:disk-write disk (first-sector-of-cluster fat32 cluster-n) spc temp-buf)
                 (setf (sys.int::ub32ref/le fat (ash last-cluster 2)) cluster-n
                       last-cluster cluster-n))
               t))
        (setf last-cluster cluster-n)
        (replace temp-buf array :start2 (* n-cluster spc sector-size))
        (mezzano.supervisor:disk-write disk (first-sector-of-cluster fat32 cluster-n) spc temp-buf))))
  
  