Skip to content

Feature request: make file.exists interruptable

3 messages · Christopher Hammill, Brian Ripley

#
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.

Thanks,

Chris


________________________________

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.
#
The place for feature requests is bugs.r-project.org .
On 15/04/2019 18:44, Christopher Hammill wrote:
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.
#
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