documentation: Document changes

This commit is contained in:
ZyX 2015-07-18 12:23:42 +03:00
parent 1206ac953f
commit 01901e0038
2 changed files with 16 additions and 7 deletions

View File

@ -4573,15 +4573,16 @@ mkdir({name} [, {path} [, {prot}]])
If {prot} is given it is used to set the protection bits of
the new directory. The default is 0755 (rwxr-xr-x: r/w for
the user readable for others). Use 0700 to make it unreadable
for others. This is only used for the last part of {name}.
Thus if you create /tmp/foo/bar then /tmp/foo will be created
with 0755.
Example: >
for others.
{Nvim}
{prot} is applied for all parts of {name}. Thus if you create
/tmp/foo/bar then /tmp/foo will be created with 0700. Example: >
:call mkdir($HOME . "/tmp/foo/bar", "p", 0700)
< This function is not available in the |sandbox|.
Not available on all systems. To check use: >
:if exists("*mkdir")
<
If you try to create an existing directory with {path} set to
"p" mkdir() will silently exit.
*mode()*
mode([expr]) Return a string that indicates the current mode.
If [expr] is supplied and it evaluates to a non-zero Number or

View File

@ -64,6 +64,14 @@ are always available and may be used simultaneously in separate plugins. The
`neovim` pip package must be installed to use Python plugins in Nvim (see
|nvim-python|).
|mkdir()| behaviour changed:
1. Assuming /tmp/foo does not exist and /tmp can be written to
mkdir('/tmp/foo/bar', 'p', 0700) will create both /tmp/foo and /tmp/foo/bar
with 0700 permissions. Vim mkdir will create /tmp/foo with 0755.
2. If you try to create an existing directory with `'p'` (e.g. mkdir('/',
'p')) mkdir() will silently exit. In Vim this was an error.
3. mkdir() error messages now include strerror() text when mkdir fails.
==============================================================================
4. New Features *nvim-features-new*