macosfinderkernel-extensionvirtualfilesystem

How to implement a virtual filesystem on macos?


I have seen that some applications are able to represent themselves as external disks within Finder on MacOS. Typically, these are cloud storage applications such as PCloud Drive and WD Discovery. I'm wondering how they do this.

I realize that cloud storage might just implement some remote filesystem protocol such as Samba or AFP. But I still don't quite understand how an app mounts the filesystem directly into Finder. Also, is there a more efficient way to mount a virtual filesystem if it doesn't rely on network storage?


Solution

  • This is a fairly high-level question, so I'll give a high-level answer. I don't know how the specific examples you list implement it, but this shouldn't be too hard to find out.

    As far as I'm aware, the options are as follows:

    *since macOS 13, the FAT file system is implemented in user space via a not-(yet)-public file system API.