[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: probe-file & file-write-date redundancy?
- To: info-mcl@cambridge.apple.com, weyer@apple.com
- Subject: Re: probe-file & file-write-date redundancy?
- From: jbk@world.std.com (Jeffrey B Kane)
- Date: Wed, 3 Feb 1993 11:39:27 -0500
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.]