mount / map network drive

Discussion in 'Mac Programming' started by DannyDN, Dec 14, 2011.

  1. macrumors newbie

    Joined:
    Dec 14, 2011
    #1
    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
     
  2. Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #2
    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
     
  3. thread starter macrumors newbie

    Joined:
    Dec 14, 2011
    #3
    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
     
  4. Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #4
    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
     

Share This Page