Yes, that surely will be the smartest thing to do.
Thanks for your help!
Just for my understanding:
The isXxxFile(atPath:)
methods as well as the resourceValues(forKeys:)
method are based on access
and should (theoretically) return the same permissions. Or am I misunderstanding?
EDIT (12.02.21):
@Eskimo's answer was an important clue for my research.
I have now researched the following:
isXxxFile(atPath:)
methods are based on real user ID (RUID) and real group ID (RGID) (see here).- The
resourceValues(forKeys:)
method is based on the effective user (EUID) and group IDs (EGID) (see here).
Thus different access
values can be returned.
Informations for EUID vs RUID see here or here.
Regarding @eskimo's hint:
you should instead try that thing and then deal with the error
Further helpful hints and answers are welcome.