posix - Using Sys.chmod to toggle world-readability in R -
how can use sys.chmod function in r toggle readability "other", i.e. equivalent of:
chmod o+r myfile chmod o-r myfile i want leave other parts of mode alone.
chmod o+r:
mod <- file.info('tmp.txt')$mode sys.chmod('tmp.txt', mod|4) chmod o-r:
mod <- file.info('tmp.txt')$mode sys.chmod('tmp.txt', mod&!as.octmode(4))
Comments
Post a Comment