From dmurdoch at pair.com  Thu Nov 27 17:45:45 2003
From: dmurdoch at pair.com (Duncan Murdoch)
Date: Thu Nov 27 17:43:51 2003
Subject: [Rd] Question about Unix file paths
In-Reply-To: <20031127143916.A2BFB39F4@mprdmxin.myway.com>
References: <20031127143916.A2BFB39F4@mprdmxin.myway.com>
Message-ID: <o2acsv0a7hrnv0hfvvl6jf6r0lr8ojgark@4ax.com>

On Thu, 27 Nov 2003 09:39:16 -0500 (EST), "Gabor Grothendieck"
<ggrothendieck@myway.com> wrote :

>> 
>> I don't think we should add another pattern matching syntax to R.
>> Filename pattern matching is a job for the shell or the OS.
>> 
>> Duncan Murdoch
>
>
>Its not done by the shell in Windows, VAX/VMS
>and probably a number of other systems.  

In Windows it's an OS function, through the FindFirstFile and
FindNextFile API functions.  This has the advantage that wildcards
behave the same in all programs, and the disadvantage of a lack of
flexibility.

In R choose.files() uses this facility indirectly, in that it goes
through the shell file dialog functions.  We could make it go directly
to the API functions, but I don't see it as a high priority:
list.files() works fine in programs (and is portable across OS's and
shells), and choose.files() is fine for interactive use.

The only thing I'd suggest is that Unix systems should have their own
choose.files() function, designed to use whatever interactive file
selection mechanism is native to their own platform.

Duncan Murdoch


[Rd] Question about Unix file paths
Duncan Murdoch