chmod

fun chmod(mode: String)(source)

Changes POSIX file/directory permissions.

mode must be 3 digits, each being between 0 and 7

See https://nodejs.org/api/fs.html#fschmodsyncpath-mode

e.g.

file.chmod("775")

Throws

if mode is inappropriate

if the file does not exist