• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Detecting application bundle being moved
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting application bundle being moved


  • Subject: Re: Detecting application bundle being moved
  • From: Seth Willits <email@hidden>
  • Date: Wed, 17 Apr 2013 16:14:01 -0700

On Apr 17, 2013, at 4:07 PM, Ken Thomases wrote:

>> Question is: what's the easiest way to detect it having been moved? I thought I'd get lucky and somewhere there'd be a handy notification, but I don't see one. It looks like I'll have to use the FSEvent API? I'm not a fan of it, so I'm hoping there's a slimmer solution.
>
> You can use kqueue() to monitor a vnode for various modifications.  In this case, you'd monitor the directory which contains your app bundle, since moving it means removing the entry for it from there.  Obviously, not all modifications will be your app being moved, so you'd have to check.

Yeah, same deal as FSEvent.


> That said, this seems like checking that the user hasn't poured molasses into their computer's vents.  If the user is determined to break their system, there's nothing you'll be able to do to stop them.

They're not determined, they just don't know it'll break things — Finder didn't even warn me when I was doing it. This is not the user's fault and it's happening often enough I want to do something about it.



--
Seth Willits


_______________________________________________

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


References: 
 >Detecting application bundle being moved (From: Seth Willits <email@hidden>)
 >Re: Detecting application bundle being moved (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Detecting application bundle being moved
  • Next by Date: Semaphore strangeness
  • Previous by thread: Re: Detecting application bundle being moved
  • Next by thread: Semaphore strangeness
  • Index(es):
    • Date
    • Thread