chmod
public func chmod(String, Int32) -> Result[(), IoError]Changes the mode bits of path to mode.
Wraps chmod(2). mode is the raw POSIX mode bits (e.g.
0o755); pass it as Int32. Resolves symlinks (use lchmod
equivalent if you need to change a link itself — not currently
exposed).
Errors
Returns Err(IoError) on any libc failure; errno is captured.
Examples
chmod("/tmp/script.sh", Int32(intLiteral: 0o755));
Defined in lang/std/os/fs.ks