• 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 set the bundle bit?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to set the bundle bit?


  • Subject: Re: How to set the bundle bit?
  • From: Ayyapu Reddy <email@hidden>
  • Date: Wed, 21 Jul 2004 19:08:40 +0530

Thank you, But the API you have suggested is not working for the
folders. Is there any special settings or options for the folders?

here is the code that i wrote.

NSString *path=@"/Users/ayyapu/mydir";
FSRef fsRef;
FSSpec fsSpec;
FInfo finfo;
OSErr getFSRefAtPathError=getFSRefAtPath(path,&fsRef);
OSErr getCatalogInfoError=FSGetCatalogInfo(&fsRef,
kFSCatInfoNone,
NULL,
NULL,
&fsSpec,
NULL);
OSErr getErr=FSpGetFInfo(&fsSpec,&finfo);
finfo.fdFlags=finfo.fdFlags | kHasBundle;
OSErr setErr=FSpSetFInfo(&fsSpec,&finfo);



On 21-Jul-04, at 5:06 PM, Stiphane Sudre wrote:

>
> On Jul 21, 2004, at 1:25 PM, Ayyapu Reddy wrote:
>
>> Hi,
>> I have a non-multi document cocoa application. I am trying to make a
>> file package (folder with some files). I like to know how to set the
>> bundle bit using some Cocoa API so the folder will look like a file
>> in the Finder. I looked through the list archives and figured out
>> that I need to set the bundle bit, but how? Any help is really
>> appreciated. Thanks.
>
> I don't have the slightest idea how you can do that using only the
> Cocoa APIs but if you may use the CoreCarbon APIs and get/set the
> FolderInfo record (via the Files.h and Finder.h methods IIRC).
_______________________________________________
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 set the bundle bit? (From: Ayyapu Reddy <email@hidden>)

  • Prev by Date: Redirecting screencapture output
  • Next by Date: Re: How to set the bundle bit?
  • Previous by thread: How to set the bundle bit?
  • Next by thread: Re: How to set the bundle bit?
  • Index(es):
    • Date
    • Thread