[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: probe-file & file-write-date redundancy?

  Sorry I sent a some code that only did half of what you want.  Here is
the complete code:

(defun mac-FILE-WRITE-DATE-OR-NIL (fname)
  (with-pstrs ((ps fname))
    (rlet ((pb :paramblockrec
               :ioCompletion (%null-ptr)
               :ioVRefNum 0
               :ioFVersNum 0
               :ioFDirIndex 0
               :ioNamePtr ps))
      (if (= (#_GetFInfo pb) 0)
          (rlet ((dtr :DateTimeRec
                      :month 0
                      :year 0
                      :day 0))
            (#_Secs2Date (pref pb :paramblockrec.ioFlMdDat) dtr)
            ;(inspect dtr)
            (encode-universal-time (pref dtr :DateTimeRec.second)
                                   (pref dtr :DateTimeRec.minute)
                                   (pref dtr :DateTimeRec.hour)
                                   (pref dtr :DateTimeRec.day)
                                   (pref dtr :DateTimeRec.month)
                                   (pref dtr :DateTimeRec.year))))

(mac-probe-file "Tweety:Barry VOM")


Jeffrey Kane, MD
Kane Biomedical Systems
Boston, MA

Internet    jbk@world.std.com
Compuserve  74206,640
AppleLink   D0738

[Don't take life too seriously... it's not like anyone gets out of it alive.]199852