MacFUSE has been taking the Mac development community by storm. I’ve been hoping for a while that Fuse would get ported to Mac OS X, and Amit Singh fortunately obliged. I won’t bother elaborating on what MacFUSE is, Amit does a fine job of that himself, however I would like to present my Objective-C wrapper for MacFUSE:
http://toxic-public.googlecode.com/svn/tags/BlogTag_20070927_729/Projects/Projects/Misc/FuseTest/ (Subversion)
The code allows you to write a FUSE file system just by subclassing the CFileSystem class and providing concrete implementations for some or all of the CFileSystem’s methods.
The code is (as always) a work in a progress and about 3/4 of the FUSE operations have been wrapped as methods. Currently the code is missing all the extended attribute operations and a handful of other operations - but nothing crucial that should prevent a useful file system from being created.
To test my code I have created a “ShadowFS” file system that creates a file system that acts as a clone or shadow of a specified directory. The ShadowFS class is pretty short, currently just over 200 lines of code to implement a file system.
If you have MacFUSE installed (I installed it via the unofficial disk image at XXXX) then you should be able to checkout the “FuseTest” project, and build and run the “ShadowFS” target. This will create a mount point in “/tmp/ShadowFS_XXXXXXXX” and mount a volume called “Test” that is a copy of your “~/Movies” directory. A volume called “Test” (with a generic network share icon) should be mounted on your desktop. Ejecting the volume will allow the ShadowFS process to quit.
I hope this code can be used to jump start other people developing MacFUSE file systems and to help I’m releasing my code under the BSD license (the FUSE client library itself is under the LGPL). I’m hoping to see some cool Mac file systems in the near future and have a few good ideas myself.
I imagine there will be other Objective-C MacFUSE implementations soon but if anyone is interested in contributing to this project= please let me know.
Add New Comment
Viewing 7 Comments
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Is it possible to have a VFS mounted in only one applications address space? I'm trying to find a way to encrypt a directory of python scripts and have them mounted virtually inside the host application in order to make it harder for hackers to see whats going on. Basically I don't want to mount the FS and then have it accessible via the Finder for example, only in the application that mounts it (I presume this is possible via the C API)
Possible?
Do you already have an account? Log in and claim this comment.
I dont think you can mount something completely privately like that. I think you can suprress the notifications that get sent when a volume is mounted though.
But can't you do what you're trying to with normal python .zip format modules?
Do you already have an account? Log in and claim this comment.
Thats very very interesting to learn about! Does it handle encryption though? That would be perfect!
Do you already have an account? Log in and claim this comment.
There's no encryption in (Mac) FUSE or my objc wrapper.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Add New Comment