[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [RFC] Paths API (svn_dirent_uri.h) - improvements

From: Branko Cibej <brane_at_xbc.nu>
Date: Wed, 11 Nov 2009 14:25:19 +0100

Julian Foad wrote:
> I'm considering some improvements to the "dirent/uri" API.

In general, +1; I find myself to be somewhat confused by the new API,
not because I don't understand the concepts, but because there's still
some overlap.

> One meta-comment is that I feel the low-level path and URL functions
> should be coming straight from APR (or other such support library)
> whereas we seem to have written many of our own.

I think you'll find that APR's functionality is either less or more than
we need, depending on circumstances. But again, in general, +1.


> * (Advanced.) An OSPATH object should know whether it is case-sensitive.
> The default would be according to the platform it's running on, but
> different file systems have different case-sensitivity so eventually if
> we want to get better at handling such issues we'll need this. I'm not
> planning to do this. However it is an example of how we may need to
> encapsulate the path in an object rather than always represent it as a
> plain string.

I don't believe any such intrinsic knowledge is going to work. We have
to solve the case-folding problems (such as a case-change-only rename on
Windows) inside the WC library, not the path library. Detecting that
"this name is the same as that other different one on disk" is more
complex than answering the question, "is this filesystem
case-insensitive". You have to let the filesystem itself tell you that,
you can't rely on OS locale-specific APIs to give the right answer.

-- Brane

Received on 2009-11-11 14:26:42 CET

This is an archived mail posted to the Subversion Dev mailing list.