Mike Shaver wrote:
[EMAIL PROTECTED]">
I'd prefer to not have nsIFile depend on the directory service, myself.
nsIDirectoryService is a core part of xpcom. True, it's a dependency, but I'd say a harmless one.
[EMAIL PROTECTED]">

Why not:

AString persistentRelativePath(in nsIFile base)

so that you can find things relative to whatever path you care about?
It's possible but harder on the callsites, They would have to know what file 'base' was and then use directory service to get it. With what I was proposing, 'base' would actually be encoded into the descriptor string. That descriptor can now be decoded by anyone without knowing what it's relative to. This would mainly be used by consumers like mailnews, profile, etc., where the 'base' file is some well known location defined by directory service. Although you could use what you propose on any file in the file system, I'm not sure if we have any need to do that... There are benefits to either approach though. I'm not hell-bent on what I suggested.
[EMAIL PROTECTED]">


I had to do something like that for the xpcom registry relativization, and
it worked pretty well.

Mike







Reply via email to