anchor.diff:        (replace result temp-buf :start1 (* n-cluster spc sector-size)))))
   
   ;; TODO Add posibility to resize file
  +;; TODO Don't rewrite unchanged clusters.
   (defun write-file (fat32 disk start-cluster fat array)
     (let* ((spc (fat32-sectors-per-cluster fat32))
            (sector-size (mezzano.supervisor:disk-sector-size disk))
  
positive.code:                                (aref file (+ i 13)) checksum
                                 (sys.int::ub16ref/le file (+ i 26)) 0
                                 i (next-space file i))))))
      (multiple-value-bind (second minute hour date month year) (get-decoded-time)
        (let ((time (logior (ash second -1)
                            (ash minute 5)
                            (ash hour 11)))
              (date (logior date
                            (ash month 5)
                            (ash (- year 1980) 9)))
              (cluster-number (next-free-cluster (fat host)))
              (millisecond-stamp 0))
          (flet ((set-short-name (name file i cluster-number)
                   ;; Write short name part
                   (loop
  
negative.code:   (read-buffer-size stream))
  
  ;; WIP
  (defmethod close ((stream fat32-file-stream) &key abort)
    (cond ((not abort)
           (let* ((host (host stream))
                  (file-length (read-buffer-size stream)))
             (multiple-value-bind (directory cluster-n offset)
                 (find-file host (file-stream-pathname stream))
               (multiple-value-bind (time date) (get-fat32-time)
                 (when (member (direction stream) '(:output :io))
                   (let ((host (host stream)))
                     (write-file (fat32-structure host)
                                 (partition host)
                                 (read-buffer-position stream)
                                 (fat host)
                                 (read-buffer stream)))
                   ;; Set file size
                   (setf (sys.int::ub16ref/le directory (+ offset 22)) time
                         (sys.int::ub16ref/le directory (+ offset 24)) date
                         (sys.int::ub32ref/le directory (+ 28 offset)) file-length))
                 ;; Set last accsess date
                 (setf (sys.int::ub16ref/le directory (+ offset 18)) date))
               ;; Write to disk new metadata
               (write-file (fat32-structure host) (partition host) cluster-n (fat host) directory))))
          (t (error "Aborted close not suported")))
    t)
  
  