Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DannyDN

macrumors newbie
Original poster
Dec 14, 2011
4
0
Hello out there :)

Im new to apple programming. I need to be able to map a network drive in cocoa / obj-c. I have searched the net, found api for linux, but nonetheless no help for doing this on mac. Aren't there any package in cocoa with prebuilt function for this task?

Thanks

Danny
 
It appears that most solutions to this either use Carbon or Applescript to achieve this.

Can you be more specific as to what kind of file system you are mounting? AFP? SMB? NFS? ...

B
 
Hello Balamw
sorry for my late reply, and tx for yours :)

The network I am trying to mount would be windows server environment system with active directory, I assume they run nfts.

I have tried bridging the finder object in objective-c as I found an applescript example which used the finder object and the mount command, somehow the mount command is not part of the framework in finder when used by bridging (if this makes sense at all, remember me being a newbie)

...
try
mount volume "smb://user@server/share"
end try
...

tx for your help.

regards Danny
 
Yeah. That seems to be the simplest approach. Use Finder to do the heavy lifting for you via some Applescript. I think you're on the right track. Is it working for you?

FWIW:

NFS is a Unix network file system standard
AFP is Apple File Protocol
SMB (now CIFS) is Windows network sharing protocol

To confuse things

NTFS is the standard Windows file system for local (non-network) disks and is not relevant here.

B
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.