• 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: Is a file open in another application?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is a file open in another application?


  • Subject: Re: Is a file open in another application?
  • From: Kyle Sluder <email@hidden>
  • Date: Sat, 19 Mar 2011 11:10:48 -0700

On Sat, Mar 19, 2011 at 9:13 AM, Conrad Shultz
<email@hidden> wrote:
> Note that this will only capture files that are properly opened (i.e.
> fopen()'d), so you won't catch every apparently open file.  For example,
> if you open a file in vi(m), it creates a hidden scratch file in the
> same directory and closes the original file.  You then edit the scratch
> file, which is only written out to the original file on save.  In this
> way, the original file is protected from damage due to a crash, but lsof
> will almost never show it as being open.

This is also how Cocoa apps work. They only keep the file open to read
its contents.

I'm afraid that what Brad wants to do is not possible yet.

--Kyle Sluder
_______________________________________________

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

  • Follow-Ups:
    • Re: Is a file open in another application?
      • From: Conrad Shultz <email@hidden>
References: 
 >Is a file open in another application? (From: Brad Stone <email@hidden>)
 >Re: Is a file open in another application? (From: Conrad Shultz <email@hidden>)

  • Prev by Date: Re: NSTask is intermittently failing to return results.
  • Next by Date: Re: Is a file open in another application?
  • Previous by thread: Re: Is a file open in another application?
  • Next by thread: Re: Is a file open in another application?
  • Index(es):
    • Date
    • Thread