lotus



previous page: 4.10) How do I make the Finder see a new file that I created? Or if I changed the type of it; how do I display a new icon for it? (Files - Mac Programming)
  
page up: Mac Programming FAQ
  
next page: 4.12) How do I set what folder should initially be shown in the SFGetFile boxes? (Files - Mac Programming)

4.11) Aren't we done with PBGetCatInfo soon? (Files - Mac Programming)




Description

This article is from the Mac Programming FAQ, by Jon Watte h+@austin.metrowerks.com with numerous contributions by others.

4.11) Aren't we done with PBGetCatInfo soon? (Files - Mac Programming)

Well, it turns out that you can also find out whether an FSSpec is a
file or a folder by calling PBGetCatInfo and check bit 4 (0x10) of
ioFlAttr to see whether it is a folder. You may prefer to call
ResolveAliasFile for this instead.
You can also check the script of the file's title using PBGetCatInfo and
check the ioFlFndrXInfo field if you want to work with other script
systems than the Roman system.

Another common use is to find out how many items are in a folder; the
modification date of something or the correct capitalization of its name
(since the Mac file system is case independent BUT preserves the case
the user uses)

 

Continue to:















TOP
previous page: 4.10) How do I make the Finder see a new file that I created? Or if I changed the type of it; how do I display a new icon for it? (Files - Mac Programming)
  
page up: Mac Programming FAQ
  
next page: 4.12) How do I set what folder should initially be shown in the SFGetFile boxes? (Files - Mac Programming)