Monday, January 22, 2007


As many of you know, a little over a week ago Google announced the open sourcing of MacFUSE. FUSE allows functional file systems to be implemented in user-space programs, without the need to write any kernel code.

Amit already did all the hard work with MacFUSE; I just wanted to play with it. I thought it might be cool to stick a file system interface on Spotlight, so in my free time I came up with SpotlightFS. It is basically a MacFUSE file system that creates true smart folders, where the folders' contents are dynamically generated by querying Spotlight. This differs from Finder's version of smart folders, which are really plist files with a .savedSearch file extension. Since SpotlightFS smart folders are true folders, they can be used from anywhere—including the command line!

SpotlightFS is currently available for download from the MacFUSE Downloads page. Feel free to check it out.


Hamish said...

Hi Greg,

Thank you very much for writing SpotlightFS. Unfortunately, I couldn't find any source code in either the MacFUSE project page's download section or its Subversion tree. I was wondering whether I missed it, or whether you had any plans for making it available? I was thinking of writing one myself, but it seems a shame to duplicate effort in this way, plus I'm not entirely sure of best practice combining a FUSE agent with a runloop, and your Spotlight filesystem would be a very useful demonstration of this.

Also, double-clicking is not working for me: reported in console.log is "fuse: failed to exec mount program: No such file or directory". It works fine when I execute it at the command line using /Applications / Contents/ MacOS/ SpotlightFS. What is it looking for? I have mount_fusefs as described in the HOWTO, at /System/ Library/ Filesystems/ fusefs.fs/ mount_fusefs.


Anonymous said...

Issue 47 at appears to be the same thing. Check back there as we diagnose that one, and likely it should fix your problem as well. If not, let me know.

Hamish said...

Thanks. But do you have an answer for my first question also?

Rickey Henderson said...

Dig your blog. Check mine out sometime--its pretty damned good and worth bookmarking:

Kumiko said...

Hi! I really like your blog! I run a website at that interviews bloggers from all over the internet. And I'd like to interview you for my site!

It'll only be about five questions, and you'll receive at least three links back to your site. It's a great way to promote your site and you don't need to do anything in return!

If you're interested, please e-mail me at and I'll send you the interview questions for your blog!

Thank you!


Sarunas said...


Will you be releasing the source code?

Zaara said...
This comment has been removed by a blog administrator.
D. Kick said...

SpotlightFS source code

Mike said...

Is there any documentation for SpotlightFS? I installed MacFuse, and when I run SpotlightFS, I get a spotlightFS volume... which I can't write to, create directories on, or do anything with in any way. The page at is hopelessly vague. It seems to imply I should be able to create directories on my SpotlightFS volume, which I just can't, either in Finder or Terminal. (It also says"if you now navigate Finder's menu to 'Go > Go to Folder...' (or hit cmd+shift+g) and type the name of a folder to go to, you'll magically be presented with the contents of that folder.)"... Er, 'Go to folder...' did that already, I didn't need to install an additional filesystem for that, thanks.)

You guys obviously put a lot of work into this, some documentation so we could actually use it would be great!

Anonymous said...

I am having the same problem. Cannot write to the SpotlightFS mount.

jdewey2@blackcomb:/Volumes/SpotlightFS> touch tt
touch: tt: Permission denied
jdewey2@blackcomb:/Volumes/SpotlightFS> pwd
jdewey2@blackcomb:/Volumes/SpotlightFS> ls -ld /Volumes/SpotlightFS
dr-x------ 2 jdewey2 jdewey2 0 Aug 11 14:40 /Volumes/SpotlightFS

Not sure why it mounts ro when running the app.

Luis Sisamon said...

Hi, Thanks for developing SpotlightFS. I am having some problems trying to create "complex" folders, I would like to be able to restrict the search to some specifric kind of documents, for example. How should I write the mkdir ?
is any resource to provide support?