From 5122527943d7d363d9cb5ef8c3822435d457bfca Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 13 Mar 2020 14:45:52 +0100 Subject: [PATCH] docs: update Filesystem.writeFile sample (#2568) --- site/docs-md/apis/filesystem/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/site/docs-md/apis/filesystem/index.md b/site/docs-md/apis/filesystem/index.md index 34a8625dfd..25d485d1d6 100644 --- a/site/docs-md/apis/filesystem/index.md +++ b/site/docs-md/apis/filesystem/index.md @@ -31,12 +31,13 @@ const { Filesystem } = Plugins; async fileWrite() { try { - await Filesystem.writeFile({ + const result = await Filesystem.writeFile({ path: 'secrets/text.txt', data: "This is a test", directory: FilesystemDirectory.Documents, encoding: FilesystemEncoding.UTF8 }) + console.log('Wrote file', result); } catch(e) { console.error('Unable to write file', e); }