I'm surprised that a fileReferenceURL would be cached in a filePathURL at all. My expectation is when calling fileReferenceURL on a file path URL is to get a reference to the file at the exact file path right now if it is there (or nil) and I would have to hold the fileReferenceURL on first access to follow the file around. I can understand that thinking, but it's not the system’s perspective. The system’s view here is that the file reference is considered more authoritative than the path. The reason for this is pretty simple- it's easy for an app to track a path (just store it as a string), but the only way an app can track a file system object is by doing what file references do. The preference for the reference object also ends up masking also sort of common behaviors which would otherwise be highly disruptive. For example, it allows users to rename directories without having to worry about the consequence that might have on whatever files their apps might happen to be interacting with. Based on your previ
Topic:
App & System Services
SubTopic:
Core OS
Tags: