View source: R/make_readonly.r
| make_readonly | R Documentation |
This function will change the file attributes so only read access is set
make_readonly(x)
x |
character of length 1 with the path that contains files or character vector with filenames to be set to read-only |
This function will attempt to set a read-only attributes on files. This is either done through system commands
such as attrib for windows and chmod for linux (444). With the latter take into account possible issues
with (sudo) rights on files.
In case x is a directory, the function will set readonly attribute for all files in the folder (and recurse into all subfolders!).
nothing is returned, only system commands are issued
Richard Hooijmaijers
tmpf <- tempfile(fileext = ".txt")
cat("test",file=tmpf)
make_readonly(tmpf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.