[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: John Peacock <jpeacock_at_rowman.com>
Date: 2006-02-06 18:52:57 CET

von Löwis Martin wrote:
> py> os.chdir("tmp")
> py> f=open("Foo...","w")
> py> f.write("Test")
> py> f.close()
> py> os.listdir(".")
> ['Foo']
> py> os.stat("Foo...")
> (33206, 0L, 2, 1, 0, 0, 4L, 1139240730, 1139240730, 1139240724)
> py> open("Foo...").read()
> 'Test'

Ooh, Windows is slightly less stupid than I thought! ;-)

The problem, of course, is that stat() requires you to know the filename
ahead of time, so you could only use it for looking for files you
already knew were supposed to be there (like from .svn/entries). You
would still need to (in practice) use readdir() to find out about files
you didn't expect to find. And this would still show the "renamed" file
which you would have to know to ignore.

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Feb 6 18:53:47 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.