summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-03-08 17:08:53 +0100
committerBram Moolenaar <Bram@vim.org>2016-03-08 17:08:53 +0100
commit8049253b96838b3584600e5ad229abad37a95b10 (patch)
tree95cf5df54baa3ad50f11385daf94d648ecb5f0a8 /runtime
parent9fe885e49ade94e6277db0dd18a5bbc1c94c60c4 (diff)
downloadvim-git-8049253b96838b3584600e5ad229abad37a95b10.tar.gz
patch 7.4.1516v7.4.1516
Problem: Cannot change file permissions. Solution: Add setfperm().
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 4251eb45a..8910f2ff4 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2067,6 +2067,7 @@ serverlist() String get a list of available servers
setbufvar( {expr}, {varname}, {val}) set {varname} in buffer {expr} to {val}
setcharsearch( {dict}) Dict set character search from {dict}
setcmdpos( {pos}) Number set cursor position in command-line
+setfperm( {fname}, {mode}) Number set {fname} file permissions to {mode}
setline( {lnum}, {line}) Number set line {lnum} to {line}
setloclist( {nr}, {list}[, {action}])
Number modify location list using {list}
@@ -3830,6 +3831,8 @@ getfperm({fname}) *getfperm()*
< This will hopefully (from a security point of view) display
the string "rw-r--r--" or even "rw-------".
+ For setting permissins use |setfperm()|.
+
getftime({fname}) *getftime()*
The result is a Number, which is the last modification time of
the given file {fname}. The value is measured as seconds
@@ -6001,6 +6004,24 @@ setcmdpos({pos}) *setcmdpos()*
Returns 0 when successful, 1 when not editing the command
line.
+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()|.
+
+
setline({lnum}, {text}) *setline()*
Set line {lnum} of the current buffer to {text}. To insert
lines use |append()|.