hammerspoon2-docs
    Preparing search index...

    Function setPermissions

    • Set the POSIX permission bits of a file or directory. Follows symbolic links.

      Parameters

      • path: string

        Path to the file or directory. ~ is expanded.

      • permissions: number

        The permission bits, as an integer between 0 and 0o7777, e.g. 0o644. Use an octal literal: decimal 755 is a different (and unusual) mode.

      Returns boolean

      true on success, false on failure (including EINVAL if permissions is missing or out of range).