Skip to content

Commit

Permalink
docs: update Filesystem.writeFile sample (#2568)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Mar 13, 2020
1 parent 2c809ab commit 5122527
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion site/docs-md/apis/filesystem/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 5122527

Please sign in to comment.