[Rd] Feature request: make file.exists interruptable

Prof Brian Ripley r|p|ey @end|ng |rom @t@t@@ox@@c@uk
Tue Apr 16 16:24:12 CEST 2019


The place for feature requests is bugs.r-project.org .

On 15/04/2019 18:44, Christopher Hammill wrote:
> Hi R developers,
> 
> On slow file systems with large lists of files, file.exists can take a long time to run. It would be nice if users could interrupt this function. I think it would be simple to add:
> 
> https://svn.r-project.org/R/trunk/src/main/platform.c,
> 
> at line 1373, add "R_CheckUserInterrupt();" perhaps every some number of iterations if performance is a concern here.

It is a concern, and it is (very) unusual to call file.exists() on more 
than one file (as its name implies).  Perhaps you could give us some 
idea of what you are trying to do and how many files take how many 
seconds on what OS/filesystem.

For completeness, dir.exists() can be used with more than one path and 
potentially has the same issue.

-- 
Brian D. Ripley,                  ripley using stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford



More information about the R-devel mailing list