I've finished up a batch of changes to have File subclass Resource cleanly. Part of these changes was to make Resource behave more like the existing File API:
Before a Resource didn't have a Uri until it was "mounted", now a Resource takes it Uri at construction time and it is never null
Resource.isMounted -> Resource.exists
Resource.add -> Resource.create
Before a Resource used the "add" method and was based on adding directly to the parent via a simple name. Now resources are mounted using the "create" method and assumed to be created by the path defined by the uri.
I'm still not totally happy with the service provider side of things and the ResourcePeer hooks - I expect that has some serious refactoring in its future.
brian Sun 23 Dec 2007
I've finished up a batch of changes to have File subclass Resource cleanly. Part of these changes was to make Resource behave more like the existing File API:
Before a Resource used the "add" method and was based on adding directly to the parent via a simple name. Now resources are mounted using the "create" method and assumed to be created by the path defined by the uri.
I'm still not totally happy with the service provider side of things and the ResourcePeer hooks - I expect that has some serious refactoring in its future.