Re: How to mount an iDisk?
Re: How to mount an iDisk?
- Subject: Re: How to mount an iDisk?
- From: John Hörnkvist <email@hidden>
- Date: Mon, 25 Feb 2002 21:03:57 +0100
On Monday, February 25, 2002, at 07:03 PM, Brant Vasilieff wrote:
Thanks for the suggestion.
mount doesn't appear to handle WebDAV, and I couldn't find a man entry
for mount_webdav. I have both a client and a server. Although it's
likely going to only ever be the client that initiates the update,
technically it's the server that contains the data. SInce I'm already
using DO, the client can fetch the data and upload it to the iDisk.
However, if I wanted to automate the process, there's a possibility
that the user will not be logged in, and thus no finder present.
Is there a UNIX tool that will work in the finders absence?
In MarshmallowMode I use the following:
- (void)goToIDisk:(id)sender
{
NSString* name=[[NSUserDefaults standardUserDefaults]
objectForKey:@"iToolsMember"];
if (![[NSFileManager defaultManager] fileExistsAtPath:[NSString
stringWithFormat:@"/Volumes/%@",name]])
{
[self mount:[NSString stringWithFormat:@"idisk.mac.com/%@",name]
atPath:[NSString stringWithFormat:@"/Volumes/%@",name]];
}
[self setPath:[[NSString stringWithFormat:@"/Volumes/%@",name]
fileForPath]];
}
- (void)mount:(NSString*)uri atPath:(NSString*)path
{
[[NSFileManager defaultManager] createDirectoryAtPath:path
attributes:nil];
//NSLog(@"Wait for mount.");
[[NSTask launchedTaskWithLaunchPath:@"/sbin/mount_webdav"
arguments:[NSArray arrayWithObjects:uri,path,nil]] waitUntilExit];
}
Regards,
John Hornkvist
--
ToastedMarshmallow, the perfect Cocoa companion
http://www.toastedmarshmallow.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.