mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 19:35:37 +00:00
documentation: Update tempfile and tempname()
This commit is contained in:
committed by
Thiago de Arruda
parent
5e42b406a5
commit
2838f2c3a6
@@ -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.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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|.
|
||||||
|
|||||||
Reference in New Issue
Block a user