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

Re: Files with trailing dots on Windows

From: Julian Reschke <julian.reschke_at_gmx.de>
Date: 2006-02-11 10:59:36 CET

Julian Foad wrote:
> ...
> It seems to me that that the feasibility of solving this class of
> problems in a friendly and automatic way depends on the ability to
> detect whether a particular filename:
>
> * can be written as-is, or
> * cannot be written, or
> * will get automatically modified (to what?)
>
> Ideally we would have an API that answers that question for a particular
> pathname (perhaps in the course of actually creating or opening the
> file) efficiently on all platforms.
> ...

I think what you're looking for is the equivalent of the Java
getCanonicalPath()
(<http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html#getCanonicalPath()>).

On Win32, that method is smart enough to know, that "xyz..." will map to
something with trailing dots removed. It is also aware about case
preservation, so for a filename of "a" it will return either "a" or "A",
depending whether a file with that name already exists, and whether itÄs
uppercase or note.

Now I *don't* know whether they use a Windows API for that, and which.
But it should be possible to find out...

Best regards,

Julian R.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Feb 11 11:02:35 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.