From dmurdoch at pair.com  Tue Nov 25 02:20:03 2003
From: dmurdoch at pair.com (Duncan Murdoch)
Date: Tue Nov 25 02:18:46 2003
Subject: [Rd] Question about Unix file paths
In-Reply-To: <x2znemc5gu.fsf@biostat.ku.dk>
References: <ils3svsfa9rt1725lb9mt42d0gc63pq8ba@4ax.com>
	<x2znemc5gu.fsf@biostat.ku.dk>
Message-ID: <17b5svs7cl2cjmto222665p545mb0ok74u@4ax.com>

>Duncan Murdoch <dmurdoch@pair.com> writes:
>
>> Gabor Grothendieck pointed out a bug to me in list.files(...,
>> full.name=TRUE), that essentially comes down to the fact that in
>> Windows it's not always valid to add a path separator (slash or
>> backslash) between a path specifier and a filename.  For example,
>> 
>> c:foo
>> 
>> is different from
>> 
>> c:\foo
>> 
>> and there are other examples.

I've committed a change to r-patched to fix this in Windows only.
Sounds like it's not an issue elsewhere.

Gabor also suggested an option to use shell globbing instead of
regular expressions to select the files in the list, e.g.

list.files(dir="/", pattern="a*.dat", glob=T)

This would be easy to do in Windows, but from the little I know about
Unix programming, would not be so easy there, so I haven't done
anything about it.

Duncan Murdoch


[Rd] Question about Unix file paths
Duncan Murdoch