[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: Kalle Olavi Niemitalo <kon_at_iki.fi>
Date: 2006-02-11 12:21:31 CET

Julian Reschke <julian.reschke@gmx.de> writes:

> 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...

GetFullPathName removes trailing dots, but it does not convert
the case of letters to match what is on the disk. The latter
seems to be doable by calling first GetShortPathName and then
GetLongPathName, but I suppose that will work only if the file
system actually generates short names. FindFirstFile may be more
reliable, but I did not try it.

In Windows Vista and "Longhorn", there may also be
GetFileInformationByHandleEx and the constant FileNameInfo,
but it is too early to rely on that.

http://msdn.microsoft.com/library/en-us/fileio/fs/file_management_functions.asp

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Feb 11 12:22:03 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.