What's new? | Help | Directory | Sign in
Google
macfuse
A User-Space File System Implementation Mechanism for Mac OS X
  
  
  
  
    
Search
for
Updated Jun 15, 2007 by singh
CUSTOM_VOLUME_ICON  
Using Custom Volume Icons with MacFUSE File Systems

Due to popular demand, I added support for custom volume icons beginning with MacFUSE 0.4.0. Before this, you could have a custom volume icon for your MacFUSE file system, but it was painful and required the file system to do extra work, specifically, you need to do the following:

Besides the extra work being, well, "extra", this approach is also somewhat inflexible because the user can't easily change the icon arbitrarily.

MacFUSE 0.4.0 adds a new mount-time option (sigh... another option) called volicon. You use it as follows:

$ sshfs user@host:/dir /some/mount/point -ovolicon=/path/to/somefile.icns

That's it. Just add -ovolicon=/path/to/somefile.icns and the volume will show up with the icon contained in somefile.icns. MacFUSE (the user-space library, specifically) will take care of serving the /.VolumeIcon.icns file. MacFUSE will also make a "best-effort" attempt at creating the dot-underscore file at mount time, and another best-effort attempt at delting the dot-underscore file at unmount time.

File system developers, take note of the following:

A substantial amount of new code was added to the user-space library to handle all of this. Please test enough. If you don't use the volicon option, the newly added code will all be bypassed.