lockpick: Change file permissions

View source: R/lockpick.R

lockpickR Documentation

Change file permissions

Description

Change file permissions

Usage

lockpick(path, mode)

Arguments

path

Path to the file for which to change permissions.

mode

Character element. One of 'close' or 'open'.

Details

This function will change the target file permissions to protect it from accidental deletion and changes. When mode is set to "close", the function will apply a chmod code "444", making the file "read-only". If set to "open", the function will apply the chmod code "666", enabling changes to the file, including deletion. This will prevent other users from modifying the file, but will allow the user to If this function is ran in windows, the function will additionally use icacls to modify file permissions. Since windows cannot interpret the chmod codes.

Value

File permission changes.


macroecology-society/masDMT documentation built on July 2, 2024, 4:08 a.m.