From 168d6924c3ebd9c6f5d5a610e5a19299d6a46bc8 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Wed, 3 Mar 2021 14:37:30 +0100 Subject: [PATCH] docs(filesystem): use proper function syntax on examples (#292) --- filesystem/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/filesystem/README.md b/filesystem/README.md index 1f051c4f9..3702a2917 100644 --- a/filesystem/README.md +++ b/filesystem/README.md @@ -20,7 +20,7 @@ Additionally, the Filesystem API supports using full `file://` paths, or reading ```typescript import { Filesystem, Directory, Encoding } from '@capacitor/filesystem'; -const writeSecretFile = async () { +const writeSecretFile = async () => { await Filesystem.writeFile({ path: 'secrets/text.txt', data: "This is a test", @@ -29,7 +29,7 @@ const writeSecretFile = async () { }); }; -const readSecretFile = async () { +const readSecretFile = async () => { const contents = await Filesystem.readFile({ path: 'secrets/text.txt', directory: Directory.Documents, @@ -39,14 +39,14 @@ const readSecretFile = async () { console.log('secrets:', contents); }; -const deleteSecretFile = async () { +const deleteSecretFile = async () => { await Filesystem.deleteFile({ path: 'secrets/text.txt', directory: Directory.Documents, }); }; -const readFilePath = async () { +const readFilePath = async () => { // Here's an example of reading a file with a full file path. Use this to // read binary data (base64 encoded) from plugins that return File URIs, such as // the Camera.