Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!apple!mattd From: mattd@Apple.COM (Matt Deatherage) Newsgroups: comp.sys.apple2 Subject: Re: SFGetFile / Pascal Question Message-ID: <52713@apple.Apple.COM> Date: 10 May 91 19:38:54 GMT References: Distribution: comp Organization: Apple Computer Inc., Cupertino, CA Lines: 28 In article tooly@zelator.uucp (Theo Schneider) writes: >Hi there, > >i got an problem with an FilterProc for SFGetFile in Complete Pascal. >In the FilterProc i will check if the File have an ResourceFork or not. > >TB Ref3 says that the Pointer for the FilterProc is an Pointer to an >DirEntryRec Template. > > | Theo Schneider |\| UUCP : tooly@zelator.in-berlin.de | Correct, but nowhere did it promise it was a _complete_ directory record. If you'll examine DirEntry.pCount, you should find a 13 ($0D), indicating the auxtype is the last field that's filled out. You need to extract the file name from the DirEntry and do a GetFileInfo to get the information you need. You can just examine storageType in the file Info record -- all files with resource forks return storage type $0005. (If you want to save some code execution time, you can leave the code you already have in, and just execute it if the pCount is greater than or equal to 16. That way you won't have to make the GetFileInfo call if future versions of Standard File up the pCount used internally.) -- ============================================================================ Matt Deatherage, Developer Technical | The opinions expressed herein are Support, Apple Computer, Inc. | not those of Apple Computer, and Personal mail only, please. Thanks. | shame on you for thinking otherwise. ============================================================================