From r|p|ey @end|ng |rom @t@t@@ox@@c@uk  Tue Apr 16 16:24:12 2019
From: r|p|ey @end|ng |rom @t@t@@ox@@c@uk (Prof Brian Ripley)
Date: Tue, 16 Apr 2019 15:24:12 +0100
Subject: [Rd] Feature request: make file.exists interruptable
In-Reply-To: <YQBPR0101MB15856467D2E279C9AD0ACBA9E82B0@YQBPR0101MB1585.CANPRD01.PROD.OUTLOOK.COM>
References: <YQBPR0101MB15856467D2E279C9AD0ACBA9E82B0@YQBPR0101MB1585.CANPRD01.PROD.OUTLOOK.COM>
Message-ID: <03a88d7d-212f-6537-bb4a-5831b8f6b2fe@stats.ox.ac.uk>

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 at stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford



[Rd] Feature request: make file.exists interruptable
Prof Brian Ripley