• 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
Change Unix Permissions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Change Unix Permissions


  • Subject: Change Unix Permissions
  • From: Lorenzo Puleo <email@hidden>
  • Date: Mon, 04 Nov 2002 16:33:27 +0100

Hi,
I have to change the permissions to a file in my Cocoa application, but I
would avoid to use:
[manager changeFileAttributes:destAttribute atPath:destFile];


I would like to use the Carbon routines. All I have to do is:
1) First I read the permissions
err = FSGetCatalogInfo(&destRef, kFSCatInfoSettableInfo, &theInfo, nil, nil,
nil);

2) And then I want to change only the Owner permissions r-x to rwx using the
following:
err = FSSetCatalogInfo(&destRef, kFSCatInfoPermissions, &theInfo);
because in one only API, here I can set FinderFlags, Dates, etc...


So please, how should I use the variable "theInfo.permissions" either for
understanding the original permissions and for setting the new permissions?
Also, will this work on no-Mac FileSystems?

--
Lorenzo Puleo
mailto:email@hidden
_______________________________________________
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.

  • Follow-Ups:
    • Re: Change Unix Permissions
      • From: Stéphane Sudre <email@hidden>
  • Prev by Date: Re: NSApplescript
  • Next by Date: Re: Images in NSOutlineViews and NSTableViews
  • Previous by thread: Re: Clearing cells in NSBrowser
  • Next by thread: Re: Change Unix Permissions
  • Index(es):
    • Date
    • Thread