On Tuesday, March 8, 2016 at 10:09:41 AM UTC-6, Bram Moolenaar wrote:
> + setfperm({fname}, {mode})                           *setfperm()* *chmod*
> +             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.
> + 
> +             To read permissions see |getfperm()|.
> + 
> + 

But, what's it do on Windows?

getfperm() seems to use the "readonly" attribute of the file to set/clear the 
'w' permission. I'm not sure whether the values for 'r' and 'x' will ever 
change.

What happens when you try to set a permission that Windows can't do?

Is there some way to get/set other attributes on Windows, such as "hidden"? 
I've used system() commands for this in one of my plugins.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui