documentation: Update tempfile and tempname()

This commit is contained in:
Pavel Platto
2014-08-08 16:24:22 +03:00
committed by Thiago de Arruda
parent 5e42b406a5
commit 2838f2c3a6
2 changed files with 4 additions and 7 deletions

View File

@@ -566,11 +566,9 @@ attack or other people reading your file). When Vim exits the directory and
all files in it are deleted. When Vim has the setuid bit set this may cause all files in it are deleted. When Vim has the setuid bit set this may cause
problems, the temp file is owned by the setuid user but the filter command problems, the temp file is owned by the setuid user but the filter command
probably runs as the original user. probably runs as the original user.
On MS-DOS and OS/2 the first of these directories that works is used: $TMP, Directory for temporary files is created in the first suitable directory of:
$TEMP, c:\TMP, c:\TEMP. For Unix: $TMPDIR, /tmp, current-dir, $HOME.
For Unix the list of directories is: $TMPDIR, /tmp, current-dir, $HOME. For MS-Windows: $TMP, $TEMP, $USERPROFILE, current-dir.
For MS-Windows the GetTempFileName() system function is used.
For other systems the tmpnam() library function is used.

View File

@@ -6212,8 +6212,7 @@ taglist({expr}) *taglist()*
tempname() *tempname()* *temp-file-name* tempname() *tempname()* *temp-file-name*
The result is a String, which is the name of a file that The result is a String, which is the name of a file that
doesn't exist. It can be used for a temporary file. The name doesn't exist. It can be used for a temporary file. Example: >
is different for at least 26 consecutive calls. Example: >
:let tmpfile = tempname() :let tmpfile = tempname()
:exe "redir > " . tmpfile :exe "redir > " . tmpfile
< For Unix, the file will be in a private directory |tempfile|. < For Unix, the file will be in a private directory |tempfile|.