I\'m using scandir in my program and passed it /Library/Preferences. It returned -1 and set errno to 1 which is EPERM Operation not permitted
scandir
/Library/Preferences
EPERM Operation not permitted