On Dec 23, 2005, at 2:12 PM, Tenzin Togden wrote:
> I was mistakenly expecting the source for SetFile functions to be
> available as an example.
>> This article http://www.macosxguru.net/article.php?> story=20031122090109169 suggests
>> "NSFileManager has the instance method - (BOOL)changeFileAttributes:
> (NSDictionary *)attributes atPath:(NSString *)path. The key to set
> file permissions is NSFilePosixPermissions and its value must be
> aNSNumber with an int value, the 9 right most bits describing the
> permissions.
> You can also use the Carbon functions FSGetCatalogInfo and
> FSSetCatalogInfo, but you probably don't want to link to Carbon
> only for that purpose, and of course the POSIX functions chmod and
> fchmod. (man 2 chmod)."
>> and the NSFileManager documentation possibly has the answer here,
>>http://www.toodarkpark.org/computers/objc/Foundation/Classes/> NSFileManager.html
>> Tenzin
Thanks for the links. Any idea if changeFileAttributes will
permanently change the file permissions? In that case it might not be
a good approach, because it could change the System files. Anyway,
I'll have a go with it and see if I can make the files appear in the
open file dialog.
BTW, any idea what the approach of TextWrangler/BBEdit could be?
These programs have a popup in the OpenDialog, where you can select
'All Files'. Only after selecting that option, the files become
selectable.
cheers,
- Koen.