import { fn } from "https://deno.land/x/ddc_vim@v4.0.2/deps.ts";
const { getfperm } = fn;
The result is a String, which is the read, write, and execute permissions of the given file {fname}. If {fname} does not exist or its directory cannot be read, an empty string is returned. The result 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. If a user does not have a given permission the flag for this is replaced with the string "-". Examples:
:echo getfperm("/etc/passwd")
:echo getfperm(expand("~/.vimrc"))
This will hopefully (from a security point of view) display the string "rw-r--r--" or even "rw-------".
Can also be used as a method
:
GetFilename()->getfperm()
For setting permissions use setfperm()
.
Parameters
denops: Denops