Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mounting SMB Servers



I have two approaches that work for mounting SMB servers. One is using NSTask to execute mount_smbfs and the other is using NSAppleScript to execute a mounting script generated on the fly. Both of these have their drawbacks:

mount_smbfs via NSTask:
Does not play nice with Finder's sidebar. Leaves artifacts long after unmounting.
Requires a more complex processor method in order to ensure arguments are properly escaped.


NSAppleScript:
Provides no option that I can see for timing out. If it can't resolve the server, then the main thread of my program hangs.



Is there a better way to go about this? The server is arbitrary. There is nothing guaranteed about it. Is using NSTask to pipe the generated script into osascript and a NSTimer instance the only way to get timing out functionality?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden


This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.