• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to know if a file is invisible
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: NSTableView scrollbars won't activate
  • Next by Date: CallBack method design
  • Previous by thread: Re: How to know if a file is invisible
  • Next by thread: rightMouseDown: (NSEvent) theEvent
  • Index(es):
    • Date
    • Thread