mirror of
https://github.com/weechat/weechat.git
synced 2026-06-29 22:36:38 +02:00
api: add function file_copy (issue #1667)
This commit is contained in:
@@ -672,6 +672,7 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
|
||||
new_plugin->mkdir_parents = &dir_mkdir_parents;
|
||||
new_plugin->exec_on_files = &dir_exec_on_files;
|
||||
new_plugin->file_get_content = &dir_file_get_content;
|
||||
new_plugin->file_copy = &dir_file_copy;
|
||||
|
||||
new_plugin->util_timeval_cmp = &util_timeval_cmp;
|
||||
new_plugin->util_timeval_diff = &util_timeval_diff;
|
||||
|
||||
@@ -68,7 +68,7 @@ struct timeval;
|
||||
* please change the date with current one; for a second change at same
|
||||
* date, increment the 01, otherwise please keep 01.
|
||||
*/
|
||||
#define WEECHAT_PLUGIN_API_VERSION "20210601-01"
|
||||
#define WEECHAT_PLUGIN_API_VERSION "20210703-01"
|
||||
|
||||
/* macros for defining plugin infos */
|
||||
#define WEECHAT_PLUGIN_NAME(__name) \
|
||||
@@ -395,6 +395,7 @@ struct t_weechat_plugin
|
||||
void (*callback)(void *data, const char *filename),
|
||||
void *callback_data);
|
||||
char *(*file_get_content) (const char *filename);
|
||||
int (*file_copy) (const char *from, const char *to);
|
||||
|
||||
/* util */
|
||||
int (*util_timeval_cmp) (struct timeval *tv1, struct timeval *tv2);
|
||||
@@ -1374,6 +1375,8 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
|
||||
__callback, __callback_data)
|
||||
#define weechat_file_get_content(__filename) \
|
||||
(weechat_plugin->file_get_content)(__filename)
|
||||
#define weechat_file_copy(__from, __to) \
|
||||
(weechat_plugin->file_copy)(__from, __to)
|
||||
|
||||
/* util */
|
||||
#define weechat_util_timeval_cmp(__time1, __time2) \
|
||||
|
||||
Reference in New Issue
Block a user