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

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



Steve,
  This is a mac specific way to do what you want.  If #_GetFInfo returns
-43 it means the file doesn't exist

(defun mac-probe-file (fname)
  (with-pstrs ((ps fname))
    (rlet ((pb :paramblockrec
               :ioCompletion (%null-ptr)
               :ioVRefNum 0
               :ioFVersNum 0
               :ioFDirIndex 0
               :ioNamePtr ps))
      (if (= (#_GetFInfo pb) 0)
        t
        nil))))

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

        Jeffrey


======================================
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.]