Skip to content

Commit 5122527

Browse files
authored
docs: update Filesystem.writeFile sample (#2568)
1 parent 2c809ab commit 5122527

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

site/docs-md/apis/filesystem/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@ const { Filesystem } = Plugins;
3131

3232
async fileWrite() {
3333
try {
34-
await Filesystem.writeFile({
34+
const result = await Filesystem.writeFile({
3535
path: 'secrets/text.txt',
3636
data: "This is a test",
3737
directory: FilesystemDirectory.Documents,
3838
encoding: FilesystemEncoding.UTF8
3939
})
40+
console.log('Wrote file', result);
4041
} catch(e) {
4142
console.error('Unable to write file', e);
4243
}

0 commit comments

Comments
 (0)