I working on a program that manages documents. One of the things my app does, is download document from the internet and open them. This documents I download need to be opened with Read Only privileges.
So, I was wondering if there is a way of programmatically setting the privileges of a file.
Thanks in advance.
In addition to
chmodmentioned by @Vlad, you can also use thesetAttributes:ofItemAtPath:error:method ofNSFileManagerwith an attribute ofNSFileImmutable: