summaryrefslogtreecommitdiffstats
path: root/app/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/file.go')
-rw-r--r--app/file.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/file.go b/app/file.go
index aba09479a..add965fd7 100644
--- a/app/file.go
+++ b/app/file.go
@@ -70,6 +70,14 @@ func (a *App) ReadFile(path string) ([]byte, *model.AppError) {
return backend.ReadFile(path)
}
+func (a *App) FileExists(path string) (bool, *model.AppError) {
+ backend, err := a.FileBackend()
+ if err != nil {
+ return false, err
+ }
+ return backend.FileExists(path)
+}
+
func (a *App) MoveFile(oldPath, newPath string) *model.AppError {
backend, err := a.FileBackend()
if err != nil {