PDA

View Full Version : mount / map network drive




DannyDN
Dec 14, 2011, 05:37 AM
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



balamw
Dec 15, 2011, 06:42 PM
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

DannyDN
Dec 20, 2011, 03:42 AM
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

balamw
Dec 20, 2011, 05:31 AM
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