Skip to main content
Module

x/denops_std/function/mod.ts>setfperm

📚 Standard module for denops.vim
Go to Latest
function setfperm
import { setfperm } from "https://deno.land/x/denops_std@v4.3.1/function/mod.ts";

Set the file permissions for {fname} to {mode}. {mode} must be a string with 9 characters. It is of the form "rwxrwxrwx", where each group of "rwx" flags represent, in turn, the permissions of the owner of the file, the group the file belongs to, and other users. A '-' character means the permission is off, any other character means on. Multi-byte characters are not supported.

For example "rw-r-----" means read-write for the user, readable by the group, not accessible by others. "xx-x-----" would do the same thing.

Returns non-zero for success, zero for failure.

Can also be used as a method:

GetFilename()->setfperm(mode)

To read permissions see getfperm().

Parameters

denops: Denops
fname: unknown
mode: unknown

Returns

Promise<number>