Re: Best way to determine if a directory is a package
Re: Best way to determine if a directory is a package
- Subject: Re: Best way to determine if a directory is a package
- From: Ken Thomases <email@hidden>
- Date: Fri, 25 Jun 2010 18:22:59 -0500
On Jun 25, 2010, at 6:16 AM, Paul Sanders wrote:
>> Hidden item names begin with a "."
>
> There is also a UF_HIDDEN flag in stat.st_flags. Google man stat os x for details (you want stat(2)). The Finder respects this flag on my 10.6.3 system. Whether it corresponds to kLSItemInfoIsVisible in LSItemInfoRecord.LSItemInfoFlags (as recommended by Jean-Daniel) I don't know. As usual in Mac-land, there are 6 ways of doing everything.
That flag is the same as the hidden/invisible flag available through the higher-level frameworks like Launch Services, the File Manager, and Cocoa.
Similarly with UF_IMMUTABLE and the locked flag.
In general, the higher-level frameworks are implemented in terms of the lower-level ones. Where higher-level concepts are not supported by the low-level implementation (e.g. a particular file system), they are emulated as best as possible.
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden