From chr|@topher@h@mm||| @end|ng |rom @|ckk|d@@c@  Tue Apr 16 16:45:00 2019
From: chr|@topher@h@mm||| @end|ng |rom @|ckk|d@@c@ (Christopher Hammill)
Date: Tue, 16 Apr 2019 14:45:00 +0000
Subject: [Rd] Feature request: make file.exists interruptable
In-Reply-To: <03a88d7d-212f-6537-bb4a-5831b8f6b2fe@stats.ox.ac.uk>
References: <YQBPR0101MB15856467D2E279C9AD0ACBA9E82B0@YQBPR0101MB1585.CANPRD01.PROD.OUTLOOK.COM>,
 <03a88d7d-212f-6537-bb4a-5831b8f6b2fe@stats.ox.ac.uk>
Message-ID: <YQBPR0101MB15858B134A6CB99A3B91801BE8240@YQBPR0101MB1585.CANPRD01.PROD.OUTLOOK.COM>

Thanks Dr. Ripley,

Unfortunately it is no longer possible for new users to file bugs on the the R bugzilla. The current guidelines on https://www.r-project.org/bugs.html say to post here:

NOTE: due to abuse by spammers, since 2016-07-09 only ?members? (including all who have previously submitted bugs) can submit new bugs on R?s Bugzilla. For now, either post (e-mail) your bug report to R-devel or ask an R Core member to add you manually to R?s Bugzilla members.

Would you be able to add me to the bugzilla so that I can raise this there?

Thanks,

Chris
________________________________
From: Prof Brian Ripley <ripley at stats.ox.ac.uk>
Sent: April 16, 2019 10:24 AM
To: Christopher Hammill; r-devel at r-project.org
Subject: Re: [Rd] Feature request: make file.exists interruptable

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://urldefense.proofpoint.com/v2/url?u=https-3A__svn.r-2Dproject.org_R_trunk_src_main_platform.c&d=DwICaQ&c=Sj806OTFwmuG2UO1EEDr-2uZRzm2EPz39TfVBG2Km-o&r=lNvpYHQ4ryl-NV5xIfGm88weE3pfbkzPUhFP6JD9S0k&m=Cnn1q_4cCTrMD3ai1HxEiW5hlvocyLp-aeYwakHTkEg&s=txQR4ftIfgjYw9N4viGK_6JZv3sMwOk4VBRXQBVqTeI&e=,
>
> 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

________________________________

This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.

	[[alternative HTML version deleted]]



[Rd] Feature request: make file.exists interruptable
Christopher Hammill