Change Unix Permissions
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.