From 0aa0adb9113455da719877f2a3553df1e0ee0a97 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Mon, 20 Aug 2018 13:18:25 -0300 Subject: Add FileInfo and get file []byte in plugin api (#9269) * Add FileInfo and get file []byte in plugin api * Regenerated plugin mocks * Rename ReadFileAtPath to ReadFile --- app/plugin_api.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/plugin_api.go') diff --git a/app/plugin_api.go b/app/plugin_api.go index c3ab8fab2..4db37cfbc 100644 --- a/app/plugin_api.go +++ b/app/plugin_api.go @@ -279,6 +279,14 @@ func (api *PluginAPI) CopyFileInfos(userId string, fileIds []string) ([]string, return api.app.CopyFileInfos(userId, fileIds) } +func (api *PluginAPI) GetFileInfo(fileId string) (*model.FileInfo, *model.AppError) { + return api.app.GetFileInfo(fileId) +} + +func (api *PluginAPI) ReadFile(path string) ([]byte, *model.AppError) { + return api.app.ReadFile(path) +} + func (api *PluginAPI) KVSet(key string, value []byte) *model.AppError { return api.app.SetPluginKey(api.id, key, value) } -- cgit v1.2.3-1-g7c22