• 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: "Open dialogue"-like file system browser
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Open dialogue"-like file system browser


  • Subject: Re: "Open dialogue"-like file system browser
  • From: David Zentgraf <email@hidden>
  • Date: Wed, 18 Jan 2006 11:44:26 +0100

Okay, it's going pretty well so far. I got a nice file browser by now. I was able to hide the .dot files, but there're still all sorts of files and directories I don't want in there, namely /var, /usr, / tmp and so on. What can I use to filter out all the directories that aren't shown in the Finder either? I can't seem to find the necessary attributes.

Thanks, Chrs,
Dav

On 2006/01/17, at 16:13, M. Uli Kusterer wrote:

On 17/01/06, David Zentgraf <email@hidden> wrote:
I want to implement a simple file system browser into my application,
which basically mirrors exactly the behaviour of a standard "Open
dialogue", including sidebar and all. It will need to be part of my
main-window though, so I can't just use the Open dialogue. Will I
have to code that myself, or is there some pre-defined object I could
use?

Oh, one more note: Sidebar is rather hackish: There are APIs to list files (see NSWorkspace), but none to get the sidebar contents. The best way I found was to parse the com.apple.sidebar.plist file in ~/Library/Preferences/ (filename may not be exact, but it's an obvious name). That file is a property list, so dictionaryFromContentsOfFile: will do most of the work. The garbage data in there is an alias record, use NDAlias or BDAlias (thrid- party code you can google for) to turn that NSData into the most current and reliable file path.

Cheers,
M. Uli Kusterer
------------------------------------------------------------
       "The Witnesses of TeachText are everywhere..."
                   http://www.zathras.de

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: "Open dialogue"-like file system browser
      • From: Uli Kusterer <email@hidden>
References: 
 >"Open dialogue"-like file system browser (From: David Zentgraf <email@hidden>)

  • Prev by Date: NSTimers
  • Next by Date: Re: Stuck in basic bindings
  • Previous by thread: Re: "Open dialogue"-like file system browser
  • Next by thread: Re: "Open dialogue"-like file system browser
  • Index(es):
    • Date
    • Thread