• 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: Accessing information from applications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing information from applications


  • Subject: Re: Accessing information from applications
  • From: James Montgomerie <email@hidden>
  • Date: Thu, 02 Jun 2011 11:54:01 -0700

Note that, depending on what you're wanting to do, this might not actually give you what you want (and getting what you want may be impossible).  Lots of apps (word processors etc.) that have document files 'open' as far as the user is concerned actually open the file, read/unarchive it into memory, close it, then use the in-memory representation while the document is displayed.

Jamie.

On 2 Jun 2011, at 11:29, Jens Alfke wrote:

>
> On Jun 2, 2011, at 11:18 AM, Abhinav K Tyagi wrote:
>
>> Is there any method to know what files are opened by any application?
>
> I think you have to use fairly low-level POSIX or BSD APIs. The tool /usr/bin/lsof does this; you could get its source code from the Darwin repository (opensource.apple.com) and see how it does it. (Or more clumsily, you could use NSTask to invoke lsof and parse its output.)
>
> This is kind of off-topic for the Cocoa list, though. People on lists like darwin-userlevel might know more.
>
> —Jens=
> _______________________________________________
>
> 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

_______________________________________________

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: 
 >Accessing information from applications (From: Abhinav K Tyagi <email@hidden>)
 >Re: Accessing information from applications (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Accessing information from applications
  • Next by Date: Re: Code style (was: Notify With Parameters)
  • Previous by thread: Re: Accessing information from applications
  • Next by thread: Re: Accessing information from applications
  • Index(es):
    • Date
    • Thread