Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Invisible dir in Finder but not kIsInvisible



Interestingly, an old app that I wrote (but no longer have the source for) does not think net and dev should be visible. As far as I remember all it checked was the LSInfo, the FSCatalogInfo, the presence of the '.' prefix or the /hidden file.

Since its not one of the last two, I think it must be one of the first two. Perhaps on some systems, these files have the wrong bits set somewhere.

Matt

On 28 May 2008, at 11:15, Olivier Tristan wrote:

static bool isHiddenFile (const String& path)
{
	FSRef ref;
	OSStatus err = FSPathMakeRefWithOptions((const UInt8*) path.toUTF8(),
kFSPathMakeRefDoNotFollowLeafSymlink, &ref, 0);
	if (err == noErr)
	{
		LSItemInfoRecord info;
		err = LSCopyItemInfoForRef(&ref, kLSRequestBasicFlagsOnly, &info);
		if (err == noErr)
		{
			return ((info.flags & kLSItemInfoIsInvisible) != 0);
		}
	}
	return false;
}

Still the dev and net(i'm on leopard) folder are showing up.
Any idea what could be missing ?

Thanks,

_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Invisible dir in Finder but not kIsInvisible (From: Olivier Tristan <email@hidden>)
 >Re: Invisible dir in Finder but not kIsInvisible (From: Jesper Papmehl-Dufay <email@hidden>)
 >Re: Invisible dir in Finder but not kIsInvisible (From: "Olivier Tristan" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.