Learn R Programming

fs (version 1.0.0)

file_chmod: Change file permissions

Description

Change file permissions

Usage

file_chmod(path, mode)

Arguments

path

A character vector of one or more paths.

mode

A character representation of the mode, in either hexidecimal or symbolic format.

Examples

Run this code
# NOT RUN {
x <- file_create(file_temp(), "000")
file_chmod(x, "777")
file_info(x)$permissions

file_chmod(x, "u-x")
file_info(x)$permissions

file_chmod(x, "a-wrx")
file_info(x)$permissions

file_chmod(x, "u+wr")
file_info(x)$permissions
# }

Run the code above in your browser using DataLab