|
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 deleting 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. NB: Custom volume icon support is implemented as a "stack module" within the MacFUSE user-space library. The volicon=/path/to/icon/file argument is actually a convenience shortcut for the following long form: ... -omodules=volicon -oiconpath=/path/to/icon/file The shortcut form will work only if you do not have any other stack module enabled. If you do, the library will not parse module arguments correctly. For example, if you want to use custom volume icons together with the subdir stack module (which takes one argument called subdir, the same as the stack module's name), you have to do the following: ... -omodules=subdir:volicon -oiconpath=/path/to/icon/file -osubdir=/path/to/subdir |