Re: How to know if a file is invisible
Re: How to know if a file is invisible
- Subject: Re: How to know if a file is invisible
- From: Rainer Brockerhoff <email@hidden>
- Date: Fri, 3 May 2002 13:25:19 -0300
>
Date: Fri, 3 May 2002 01:49:23 +0200
>
From: Ondra Cada <email@hidden>
>
>
On Friday, May 3, 2002, at 01:29 , Quentin Mathi wrote:
>
>
> Is there a method in Cocoa to know if a file is invisible ?
>
>
[[filename lastPathComponent] hasPrefix:@"."]
This determines invisibility in the Terminal only.
For invisibility in the Finder and Open panels, you also need to check if the file is listed in the volume's top folder's ".hidden" file, _and_ check if the HFS "invisible" flag is set. (See "Files.h" for the necessary Carbon calls and flag definitions.)
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"I love deadlines. I love the whooshing noise they make as they go by" (Douglas Adams)
http://www.brockerhoff.net/ (updated Apr. 2002)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.