If you don't use or have interest in the MacFUSE Objective-C framework
then no need to keep reading.

I've made a number of changes to MacFUSE.framework since the 1.7
MacFUSE release. For the long-term good of the framework, I'm trying
to be pretty aggressive about making changes that I think improve the
API. At the same time, I've tried hard to maintain backward
compatibility so that existing file systems will still work.

Maintaining backward compatibility makes the code more difficult and
time-consuming to maintain, so I do intend to remove support for
deprecated API methods after people have had a few releases to adjust.
It also makes it much harder to test the matrix of possible use cases,
especially on prior OS releases such as Tiger. I simply don't have the
bandwidth to spend the time needed to test deprecated APIs well.

*** If you rely on MacFUSE.framework then I am relying on you to test
your file systems with developer releases as they come out on all
operating system versions and platforms that you want to support. ***

There are a number of new additions and improvements to
MacFUSE.framework. If I have time then I'll try to send out a
highlight email after the next MacFUSE release. For now, I'd like to
mention items where I'd like people to update their code as soon as
possible. Comments are welcome:

1. You should now "#import <MacFUSE/MacFUSE.h>" rather than GMUserFileSystem.h.

2. The truncateFileAtPath: method has been deprecated. Instead, your
write-able file system should support the NSFileSize key in
setAttributes:ofItemAtPath: and treat it as you would a truncate
operation.

3. My impression is that people found the 'fileDelegate' parameter and
GMUserFileSystemFileDelegate protocol confusing. I've deprecated the
delegate methods that contained 'fileDelegate' in favor of ones that
have 'userData' and removed the GMUserFileSystemFileDelegate protocol
completely.

The intent of fileDelegate was to support operations that occur
directly on an open file (e.g. read, ftruncate, etc.). Unfortunately,
the previous version of the API did not support all of the 'f'
operations such as fstat, fchown, etc. In many file systems it is
perfectly fine for a process to open a file, delete it, and perform
operations on the open file. I've added support for the additional 'f'
operations by deprecating attributesOfItemAtPath: and
setAttributes:ofItemAtPath: in favor of versions that accept the
optional 'userData' parameter. A file system may choose to use this to
support operations directly on an open file handle.

I had originally intended to extend the GMUserFileSystemFileDelegate
protocol as I added more versions of methods that acted on open files,
but I realized that this would blow up the complexity of the API and
may cause confusion. A file system still needs to support operations
like 'truncate' on non-open files. With the protocol out of the
picture I decided to switch to the term 'userData' since it seems more
idiomatic for Objective-C.

4. The finderFlagsAtPath:, iconDataAtPath:, and URLOfWeblocAtPath:
delegate methods have all been deprecated. They are replaced by
finderAttributesAtPath: and resourceAttributesAtPath:. These new
methods return an NSDictionary that you may fill so that the framework
can create the relevant FinderInfo or ResourceFork. I've added a bunch
of standard keys that you can use to support all of the old stuff. The
benefits of this new approach:

- You can now have 'type' and 'creator' codes and extended finder
flags in your FinderInfo
- Support for additional resource fork attributes can be added in the
future without breaking the API or requiring more delegate methods.
- Since unknown keys are ignored, for simple file systems it may make
sense to return the same dictionary for attributesOfItemAtPath:,
finderAttributesAtPath:, and resourceAttributesAtPath:.

Note: If you want to use a custom icon then you *must* implement
finderAttributesAtPath: and return Finder flags with kHasCustomIcon
for that file.

----------

I've updated the HelloFS and LoopbackFS file systems to reflect the
current API. This may also be a good time to look at the latest
GMUserFileSystem.h header:

http://macfuse.googlecode.com/svn/trunk/core/sdk-objc/GMUserFileSystem.h

If you haven't already, I would also really appreciate it if you
filled out the developer survey:

http://spreadsheets.google.com/viewform?key=pOwYtrwIK2GY2-TBXeelmSQ

This should help me figure out how to allot my time when working on
the Objective-C API.

Thanks,
ted

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MacFUSE" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/macfuse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to