• 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: Rosyna <email@hidden>
  • Date: Thu, 2 May 2002 17:14:55 -0700

Cocoa has one method, but you'll need to use Carbon for the other (if the invisible bundle bit is set)

NSURL* someURL=getURLFromSomePlace;
LSItemInfoRecord infoRec;
OSStatus err=noErr;

err=LSCopyItemInfoForURL((CFURLRef)someURL, kLSRequestBasicFlagsOnly,&infoRef);
if (!err && ((infoRec.flags&kLSItemInfoIsInvisible) || [[[someURL path] lastPathComponent] hasPrefix:@"."]))
{
//file is invisible
}

It's sad that LaunchServices doesn't recognize . files or files listed in .hidden to be invisible.

Ack, at 5/3/02, Quentin Mathi said:

Is there a method in Cocoa to know if a file is invisible ?

--


Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People
---

Please include any previous correspondence in replies, it helps me remember what we were talking about. Thanks.
_______________________________________________
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.
References: 
 >How to know if a file is invisible (From: Quentin Mathé <email@hidden>)

  • Prev by Date: NSTextView resizing bug?
  • Next by Date: Int to NSString
  • Previous by thread: Re: How to know if a file is invisible
  • Next by thread: Re: How to know if a file is invisible
  • Index(es):
    • Date
    • Thread