CFFileSecuritySetAccessControlList(_:_:)
Sets the access control list associated with a CFFileSecurityRef object.
Declaration
func CFFileSecuritySetAccessControlList(_ fileSec: CFFileSecurity!, _ accessControlList: acl_t!) -> BoolParameters
- fileSec:
The
CFFileSecurityRefobject to modify. - accessControlList:
The access control list to set, or
kCFFileSecurityRemoveACLto indicate that the access control list should be removed from a file, orNULLto unset the access control list property in the object.
Return Value
Returns true if the access control list was successfully set, or false otherwise.
Discussion
To remove the access control list from a file system object, pass kCFFileSecurityRemoveACL as the accessControlList parameter. Then, call CFURLSetResourcePropertyForKey(_:_:_:_:) to set kCFURLFileSecurityKey to the resulting fileSec object.
Setting the accessControlList to NULL unsets the ACL property of the CFFileSecurityRef object. By doing this, the access control list of the file will be unchanged if you subsequently use this object to set permissions on an actual file system object.
See Also
Functions
CFAllocatorAllocateBytes(_:_:_:)CFAllocatorAllocateTyped(_:_:_:_:)CFAllocatorReallocateBytes(_:_:_:_:)CFAllocatorReallocateTyped(_:_:_:_:_:)CFAttributedStringGetBidiLevelsAndResolvedDirections(_:_:_:_:_:)CFBundleCopyLocalizedStringForLocalizations(_:_:_:_:_:)CFBundleIsArchitectureLoadable(_:)CFBundleIsExecutableLoadable(_:)CFBundleIsExecutableLoadableForURL(_:)CFCopyHomeDirectoryURL()CFDateFormatterCreateISO8601Formatter(_:_:)CFFileSecurityClearProperties(_:_:)CFFileSecurityCopyAccessControlList(_:_:)CFFileSecurityCopyGroupUUID(_:_:)CFFileSecurityCopyOwnerUUID(_:_:)