Apple Recent Folders and FinderPop Recent Folders[Up to topic list]  [Home]

Who What
Richard Fairbanks
12 Apr 2013, 19:08
Apple Recent Folders and FinderPop Recent Folders
Greetings, Turley!

Thank you, once again, for bringing FinderPop back; it was sorely missed!! (I hope you weren’t offended when I suggested you have a Samuel Smith’s Oatmeal Stout for me!   :-)   )

There are two points here for which I request your great wisdom, Oh Mighty Tim! (I will be as brief as I can!   ;-)   ):
1 - Apple Finder Recent Folders
2 - FinderPop Recent Folders

#### Apple Finder Recent Folders ####

Apple’s Finder plist is a most-unreliable beast (as you must know!), thus I keep it locked and just run a shell script to restore it when needed (much as I might prefer to use the Holy Hand Grenade). It works great and the Finder is much more stable, but my one challenge is that it thus doesn’t keep any recent folders.

HOWEVER!, the plist is NOT where the Finder’s Recent Folders menu gets its data. The plist is only updated every minute (or so), whereas the Recent Folders menu is updated instantly. Thus, I must assume that there is a temporary cache file somewhere that records the Recent Folders data and is what is used to display the menu list and (eventually) update the plist.

I have never been able to find The Mystery Cache File (if that is, in fact, where the Recent Folders menu data is logged). Thus I have resorted to creating a background AppleScript that, when the Finder is frontmost, keeps a list of open folders, and updates the list twice every second. (I use it to keep folders displayed properly, regardless of Apple’s obsessions.) It works, but its brutally primitive nature is embarrassing!   :-)   A launchd agent would be much more elegant.

#### FinderPop Recent Folders ####

When displaying the FinderPop menu from the menu bar, the Recent Folders menu item (i.e. Recent Items---R) is empty—not surprising given that the plist is locked.

BUT!, when the FinderPop menu is displayed by clicking on the Desktop, the full list of Recent Folders IS displayed in all its glory.

WHERE ARE YOU GETTING THAT DATA?? (and they’re not displayed as aliases!)

</groveling>

:-)

Blessings!!
turly
21 Apr 2013, 18:55
Re: Apple Recent Folders and FinderPop Recent Folders
Sorry for the delay in getting back to you, afraid I had completely forgotten.

Here's what I found: the Finder Preferences includes a CFArrayRef of CFDictionaries called FXRecentFolders.
For Lion and Mountain Lion, each such dictionary - corresponding to a single recent item - has a key called file-bookmark.
Then we call
CFURLCreateByResolvingBookmarkData ()
and from that
CFURLGetFSRef ()
giving us the FSRef of the recent item. With error checking at every step of course.

For 10.5 and 10.6, it's a bit more complicated as the items are named differently and contain raw alias data.
Richard Fairbanks
29 Apr 2013, 04:15
Re: Apple Recent Folders and FinderPop Recent Folders
Thank you, Turley; I very much appreciate your efforts!

Please allow me to request an additional FinderPop sort option, as per the “.fp-info” file conditions: “sort-order-last-opened-date” (or however you might choose). The desired order would be most recently opened at the top of the menu list.

Such would make it easier for me to quickly check a most recently opened folder, as some folders recently opened may not have been modified for some time.

Blessings, and thank you!!