I'm looking for a native macOS API that would enable me to mount network volumes.
Specifically, I'm looking to do exactly what Finder (Cmd-K) does, including passing credentials separately from the URI and mountpoint creation under /Volumes without superuser access.
Currently I'm using mount_smbfs
and mount_afp
, but:
mount_afp
doesn't work with unicode characters in password, even urlquotedYou can use the NetFS framework and NetFSMountURLSync()
or NetFSMountURLAsync()
. The documentation is in the NetFS.h header file.