chmodSync
import { chmodSync } from "jsr:@ende/fs/unstable-chmod";function · experimental · requires --allow-write
function chmodSync(path: string | URL, mode: number): voidSynchronously changes the permission of a specific file/directory of specified path. Ignores the process's umask.
Requires allow-write permission.
For a full description, see chmod.
NOTE: This API currently throws on Windows.
path: string | URLThe path to the file or directory.
mode: numberA sequence of 3 octal numbers representing permissions. See
chmod.
Example: Usage
import { chmodSync } from "@ende/fs/unstable-chmod";
chmodSync("README.md", 0o666);