search for: dirtoclean

Displaying 1 result from an estimated 1 matches for "dirtoclean".

Did you mean: dir2clean
2011 Sep 23
1
should dir(all=TRUE) return "." and ".."?
...UE, include.dirs=TRUE) does not. I always filter out the "." and ".." entries and was wondering if anyone would mind if dir(all=TRUE) just omitted them? It might make recursive file operations like cleaning out a directory safer, as unlink(recursive=TRUE, dir(all=TRUE, "dirToClean")) might start attacking dirToClean/.., then dirToClean/../.., etc., until your disk is empty. > dir.create(tdir <- tempfile("tdir")) > file.create(file.path(tdir, c(".dotFile", "noDotFile"))) [1] TRUE TRUE > dir.create(file.path(tdir, "....