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

kristiaand

macrumors member
Original poster
Dec 5, 2007
63
0
Hi All,
got a bit of a wierd problem, not sure if its me or Xcode BUT here goes.

i am looking to write a simple Cocoa App in objective C that allows a user to connect a network drive. (you click a button on the program and it automatically does the work for you)

so i went off to ADC and found a reference to NSfilemanager which seemed todo what i wanted (not sure if that was correct or not yet).

noticed it was in a file called.

NSFileManager.h

so i entered this into my header file in my program, i thought i was all done and dusted until i try to use code completion. i get no code insight for the new header file, is this correct?

also am i barking up the wrong tree using

createSymbolicLinkAtPath:pathContent:

when trying to establish a network connection????

can any of you fine, gifted people give me some insight into this problem...

thanks
kris
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
You cannot add the header on it's own: it's part of a Framework. You should simply use the Cocoa header. And you are barking up the wrong tree completely with that method: it creates a symbolic link to a file/folder. It will not connect a network drive.
 

kristiaand

macrumors member
Original poster
Dec 5, 2007
63
0
You cannot add the header on it's own: it's part of a Framework. You should simply use the Cocoa header. And you are barking up the wrong tree completely with that method: it creates a symbolic link to a file/folder. It will not connect a network drive.

Hi Robbie thanks for the reply, i already have the cocoa.h file included but when i read the info on ADC i assumed i needed to add this file, now i know i don't.

as for barking up the wrong tree i had a feeling i was do you or anyone else have a starting point i can work from regarding this?
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
There is no simple API for what you want to do. You are going to have to call out to the various low level tools (smbclient etc).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.