Re: [Rd] Proposed change in file.exists() to tolerate Windows

2015-09-10 Thread Richard Cotton
Two solutions: 1. Use the wrapper function is_existing_file in assertive. 2. Use standardize_path in pathological before you call file.exists. On 27 August 2015 at 17:02, Paul Johnson wrote: > I'm writing to ask if R Core would make file.exists more Windows > tolerant when the argument has a

Re: [Rd] Proposed change in file.exists() to tolerate Windows

2015-08-27 Thread William Dunlap
## delete trailing slashes dts <- function(name) gsub("/$", "", name) if(!file.exists(dts(any_name))) { ... I don't think you want to delete the slash in "C:/" on Windows, as "C:" is not a file and "C:/" is. normalizePath() does odd things with "C:" as well. Bill Dunlap TIBCO Software

[Rd] Proposed change in file.exists() to tolerate Windows

2015-08-27 Thread Paul Johnson
I'm writing to ask if R Core would make file.exists more Windows tolerant when the argument has a trailing slash. This has been discussed by users a few times here, I know it is not a new topic. But it is not a solved problem, yet. I acknowledge that CRAN packages exist which fix this by replacing