From e13796e4f3d986a80a9c4369ec5e0b35dbf9d8d2 Mon Sep 17 00:00:00 2001 From: vitorsemeano Date: Sat, 16 Mar 2019 19:19:00 +0000 Subject: [PATCH] add NativeShell API to filesystem module --- src/components/filesystem.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/filesystem.js b/src/components/filesystem.js index 4489d2921f..e022a1c6d0 100644 --- a/src/components/filesystem.js +++ b/src/components/filesystem.js @@ -3,10 +3,14 @@ define([], function () { return { fileExists: function (path) { - return Promise.reject(); + if (window.NativeShell && window.NativeShell.FileSystem) { + return window.NativeShell.FileSystem.fileExists(path); + } }, directoryExists: function (path) { - return Promise.reject(); + if (window.NativeShell && window.NativeShell.FileSystem) { + return window.NativeShell.FileSystem.directoryExists(path); + } } }; }); \ No newline at end of file