Filesystem APIs on Catalina exposing read-only/read-write volume split

Already filed FB6758672


It was my impression from the WWDC sessions that the split between the read-only and read-write volumes in Catalina would be, for the most part, hidden. For instance, in Finder, /Applications shows an aggregate of /Applications (on the read-write volume) and /System/Applications (on the read-only volume).


It seems that the filesystem APIs (including NSFileManager) do not aggregate these directories. I wanted to double-check here on whether my interpretation of the WWDC session is correct or not. The way it was presented was that you wouldn't notice the difference but just doing "ls /Applications" indicates that we have to be aware and handle these "split" directories.


If we are expected to handle this ourselves, then are we just supposed to reverse-engineer which directories are treated like this or is there some API or documentation pointing this out?

Replies

In the specific case of the Applications directory, the fact that the Finder shows a single unified list of applications while

ls
and
NSFileManager
reveal the split is expected behaviour. This is just a new entry in the long list of things that the Finder ‘lies’ about (the example with the most history being the trash).

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Is there any sort of list (or even better, API) that enumerates these cases?

Is there any sort of list (or even better, API) that enumerates these cases?

Not that I’m aware of.

I’m curious, what’s your expected use case for that info?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I need to either show or process files in folders. If the user selects one of these folders, I want to reflect what Finder shows. I already do special handling for the Trash but it would be nice if there was a way to know about/handle these cases without having to stumble on to each instance myself.

I think you should file an enhancement request for the API you need, making sure to describe your use case. Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

FB6827379