[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to find System folder?
- To: info-mcl@cambridge.apple.com
- Subject: How to find System folder?
- From: psto@xs4all.nl (Peter Stone)
- Date: Thu, 3 Nov 1994 10:31:00 +0100
- Full-name: Majordomo Mailing List Server
- Sender: owner-info-mcl@cambridge.apple.com
I'm using the find-special-folder to find #$kPreferencesFolderType.
It works fine in System 7 but gives "unimplemented trap" error in
System 6.07. How to make it running in both?
(defun find-special-folder (type &optional (create-p t))
(let ((kCreate (if create-p #$kCreateFolder #$kDontCreateFolder)))
(rlet ((vrefnum_p :Integer)
(foundDirId_p :LongInt)
(fsSpec_p :FSSpec)
)
(#_FindFolder #$kOnSystemDisk type kCreate vrefnum_p foundDirId_p)
(with-pstrs ((empty_cstr ""))
(#_FSMakeFSSpec
(%get-word vrefnum_p)
(%get-long foundDirId_p)
empty_cstr
fsSpec_p
) )
(%path-from-fsSpec fsSpec_p)
) ) )
Peter