summaryrefslogtreecommitdiff
path: root/doc/en
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2016-03-27 11:08:04 +0200
committerSébastien Helleu <flashcode@flashtux.org>2016-03-27 11:08:04 +0200
commitc5bb7232983fa2e865dcfde1ff4a6e7011573c75 (patch)
treeaf00decbd38a48ad39e8e7b08ff17f5bb8175b6f /doc/en
parentd3c21e355cbcd246ed3f05305e3dff73cddbe1b1 (diff)
downloadweechat-c5bb7232983fa2e865dcfde1ff4a6e7011573c75.zip
doc: update doc of function exec_on_files (plugin API reference)
Diffstat (limited to 'doc/en')
-rw-r--r--doc/en/weechat_plugin_api.en.asciidoc10
1 files changed, 6 insertions, 4 deletions
diff --git a/doc/en/weechat_plugin_api.en.asciidoc b/doc/en/weechat_plugin_api.en.asciidoc
index 002834427..9bb86f07f 100644
--- a/doc/en/weechat_plugin_api.en.asciidoc
+++ b/doc/en/weechat_plugin_api.en.asciidoc
@@ -2834,6 +2834,8 @@ weechat.mkdir_parents("/tmp/my/dir", 0755)
==== exec_on_files
+_Updated in 1.5._
+
Find files in a directory and execute a callback on each file.
Prototype:
@@ -2842,19 +2844,19 @@ Prototype:
----
void weechat_exec_on_files (const char *directory,
int hidden_files,
- void *data,
void (*callback)(void *data,
- const char *filename));
+ const char *filename),
+ void *callback_data);
----
Arguments:
* 'directory': directory for searching files
* 'hidden_files': 1 to include hidden files, otherwise 0
-* 'data': pointer given to callback when it is called by WeeChat
* 'callback': function called for each file found, arguments:
** 'void *data': pointer
** 'const char *filename': filename found
+* 'callback_data': pointer given to callback when it is called by WeeChat
C example:
@@ -2865,7 +2867,7 @@ void callback (void *data, const char *filename)
/* ... */
}
...
-weechat_exec_on_files ("/tmp", 0, NULL, &callback);
+weechat_exec_on_files ("/tmp", 0, &callback, NULL);
----
[NOTE]