Skip navigation.
 
mlHow can I filter out files in root directory like the Finder does?
FROM : Dave Camp
DATE : Fri Feb 08 18:31:29 2008

My app has an NSBroswer view that the user can files and folders in 
and I need to filter out all of the stuff that they shouldn't normally 
see, like the Finder does.

Following previous postings on this subject I've implemented the 
following:

  - Read the .hidden file from / and filter out anything listed in 
there (does not appear to be used in Leopard)
  - Call LSCopyItemInfoForRef and test for kLSItemInfoIsInvisible
  - Call FSGetCatalogInfo(kFSCatInfoFinderInfo) and test for fInfo-
>finderFlags & kIsInvisible


That gets almost everything except /home and /net, which the Finder 
does not show. I thought there might be some sort of xattrs on those 
directories that would help, but there aren't any xattrs on them.

Are there other tests I'm missing?

Thanks,
Dave

Related mailsAuthorDate
No related mails found.