anchor.diff:                                            (virtual-dir-first-cluster file))
                    (+ 2 (file-size-in-sectors file fat32)))))
   
  -(defun file-p (file)
  -  (let* ((n (virtual-dir-attributes file))
  -         (attribute-bit (ldb (byte 1 +attribute-directory+) n)))
  -    (if (= attribute-bit 1)
  -        nil file)))
  -
  -(defun read-dir-from-file (fat32 disk file)
  -  (let ((cluster (read-cluster fat32
  -                               disk
  -                               (first-sector-of-cluster fat32
  -                                                        (virtual-dir-first-cluster file)))))
  -    (read-dir-from-cluster cluster fat32)))
  +(defun decode-dir (list)
  +  (let ((name ""))
  +    (dolist (file (nreverse list))
  +      (cond ((long-dir-p file)
  +             ;; Read long name
  +             (loop for octet across (concatenate 'vector
  +                                                 (long-dir-name-0 file)
  +                                                 (long-dir-name-1 file)
  +                                                 (long-dir-name-2 file))
  +                :unless (or (= octet 0)
  +                            (= octet 255))
  +                :do (setf name
  +                          (concatenate 'string name
  +                                       (format nil "~a" (code-char octet))))))
  +            ((dir-p file)
  +             ;; Set short name for . and ..
  +             (cond
  +               ((string= ".          " (dir-name file))
  +                (setf name "."))
  +               ((string= "..         " (dir-name file))
  +                (setf name "..")))
  +
  +             (return (make-virtual-dir
  +                      :name name
  +                      :attributes (dir-attributes file)
  +                      :time-tenth (dir-time-tenth file)
  +                      :time (dir-time file)
  +                      :date (dir-date file)
  +                      :access-date (dir-access-date file)
  +                      :write-time (dir-write-time file)
  +                      :write-date (dir-write-date file)
  +                      :first-cluster (logior (ash (dir-first-cluster-high file) 16)
  +                                             (ash (dir-first-cluster-low file) 0))
  +                      :file-size (dir-file-size file))))))))
   
   (defun read-dir-from-cluster (cluster fat32)
     (loop :for i :from 0 :to (1- (/ (* (fat32-sectors-per-cluster fat32)
  
positive.code:                         :write-date (subseq cluster (+ 24 (* i 32)) (+ 26 (* i 32)))
                          :first-cluster-low (sys.int::ub16ref/le cluster (+ 26 (* i 32)))
                          :file-size (sys.int::ub32ref/le cluster (+ 28 (* i 32))))
                         stack)
                   fat32)
                  res)
                 (setf stack nil)))))
       :finally (return res)))
  
  (defun decode-dir (list fat32)
    (let ((name ""))
      (dolist (file (nreverse list))
        (cond ((long-dir-p file)
               ;; Read long name
               (loop for octet across (concatenate 'vector
                                                   (long-dir-name-0 file)
                                                   (long-dir-name-1 file)
                                                   (long-dir-name-2 file))
                  :unless (or (= octet 0)
                              (= octet 255))
                  :do (setf name
                            (concatenate 'string name
                                         (format nil "~a" (code-char octet))))))
              ((dir-p file)
               ;; Set short name for . and ..
               (cond
                 ((string= ".          " (dir-name file))
                  (setf name "."))
                 ((string= "..         " (dir-name file))
                  (setf name "..")))
  
               (return (make-virtual-dir
                        :name name
                        :attributes (dir-attributes file)
                        :time-tenth (dir-time-tenth file)
                        :time (dir-time file)
                        :date (dir-date file)
                        :access-date (dir-access-date file)
                        :write-time (dir-write-time file)
                        :write-date (dir-write-date file)
                        :first-cluster (logior (ash (dir-first-cluster-high file) 16)
                                               (ash (dir-first-cluster-low file) 0))
                        :file-size (dir-file-size file))))))))
  
  ;;; bits 0-4 2-second count, 5-10 minutes, 11-15 hours
  (defun decode-time (array)
  
negative.code: (defmethod sys.gray:stream-file-length ((stream fat32-file-stream))
    (read-buffer-size stream))
  
  ;;; testing
  #|
  ;; Mount partition
  (let* ((partition-name "FAT32") ; Put your name here
  