Skip to content
Prev 2174 / 12125 Next

[R-pkg-devel] creating indelible file during unit test

2017-12-12 15:47 GMT+01:00 Barry Rowlingson <b.rowlingson at lancaster.ac.uk>:
In a Unix system with administrator rights, you can set the immutable flag:

$ touch foo
$ chmod a-w foo
$ sudo chattr +i foo
$ rm foo
Operation not permitted

Otherwise, you can always remove your own files. Moreover, Thierry may
want the test to be cross-platform... So I think the easiest way to go
is to bypass the R function used to remove the files (file.remove,
unlink, whatever), run the test and then restore it.

I?aki