Re: hidden file
Re: hidden file
- Subject: Re: hidden file
- From: Ken Thomases <email@hidden>
- Date: Sun, 28 Nov 2010 17:05:50 -0600
On Nov 28, 2010, at 4:21 PM, Nick Zitzmann wrote:
> On Nov 28, 2010, at 3:09 PM, Ariel Feinerman wrote:
>
>> Hi everyone,
>>
>> how to check whether a file is hidden in Finder? There seems file manager
>> has no any methods to change file`s visibility like lchflags().
>
> There are three different things that can cause a file to be hidden in the Finder:
>
> 1. If it has a . at the beginning of its name
> 2. If its hidden bit is set (you can check for this using the Carbon file manager)
> 3. If its name comes up inside the .hidden file in the same folder (if such a file exists)
>
> And yes, I have a bug open on this asking for a way to do this using NSFileManager.
As of 10.6, the recommendation is to use NSURL for referencing files and accessing their metadata. In particular, see -getResourceValue:forKey:error:/-setResourceValue:forKey:error: and NSURLIsHiddenKey.
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