Re: Notification when network volume disappears
Re: Notification when network volume disappears
- Subject: Re: Notification when network volume disappears
- From: Ken Thomases <email@hidden>
- Date: Mon, 14 Jun 2010 10:04:07 -0500
On Jun 14, 2010, at 4:52 AM, Boris Prohaska wrote:
> i was just wondering, is there any way to determine when for example a network cable is plugged off while copying data to a network share? The Finder has a pretty long timeout...
>
> Is there a way in the FS API or ANY other way to get notified, when a volume isn't available for writing anymore?
If you just want to know when a volume disappears (is unmounted), NSWorkspace provides notifications for that. But I don't think that will address the issue you describe.
The problem is that the volume hasn't disappeared, it's just incommunicado as far as the OS is concerned. If it had disappeared in a way that the OS was aware of, then there would be no way for something to be stuck writing to it (or to begin writing to it, etc.). That is, there would be no paths to it for opening new file descriptors and all existing file descriptors would return errors on access.
-Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden