Mercurial > vim
diff runtime/doc/eval.txt @ 7629:befbed72da87 v7.4.1114
commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 17 15:56:34 2016 +0100
patch 7.4.1114
Problem: delete() does not work well with symbolic links.
Solution: Recognize symbolik links.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 17 Jan 2016 16:00:05 +0100 |
parents | 228ff048db20 |
children | c7575b07de98 |
line wrap: on
line diff
--- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2755,13 +2755,14 @@ deepcopy({expr}[, {noref}]) *deepcopy delete({fname} [, {flags}]) *delete()* Without {flags} or with {flags} empty: Deletes the file by the - name {fname}. + name {fname}. This also works when {fname} is a symbolic link. When {flags} is "d": Deletes the directory by the name - {fname}. This fails when {fname} is not empty. + {fname}. This fails when directory {fname} is not empty. When {flags} is "rf": Deletes the directory by the name - {fname} and everything in it, recursively. Be careful! + {fname} and everything in it, recursively. BE CAREFUL! + A symbolic link itself is deleted, not what it points to. The result is a Number, which is 0 if the delete operation was successful and -1 when the deletion failed or partly failed.