From e8fc91eecfc7909771d715d792e27b510b6ee163 Mon Sep 17 00:00:00 2001 From: Mathieu Davy Date: Fri, 11 Aug 2017 08:50:37 +0100 Subject: [PATCH] Fixing readFile method name. (#5) * Fixing readFile method name. * Updating name of task to not conflict with react method. --- windows/RNFileSystem/RNFileSystemModule.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/windows/RNFileSystem/RNFileSystemModule.cs b/windows/RNFileSystem/RNFileSystemModule.cs index 9741946..51f9d11 100644 --- a/windows/RNFileSystem/RNFileSystemModule.cs +++ b/windows/RNFileSystem/RNFileSystemModule.cs @@ -132,7 +132,7 @@ private string absulutePath(string relativePath) return rootFolder + "\\" + Regex.Replace(relativePath, "/", "\\"); } - private async Task readFile(string relativePath, Storage storage) + private async Task readFromFile(string relativePath, Storage storage) { string baseDir = baseDirForStorage(storage); @@ -211,7 +211,7 @@ public async void writeToFile(string relativePath, string content, bool isAppend } [ReactMethod] - public async void readToFile(string relativePath, string storage, IPromise promise) + public async void readFile(string relativePath, string storage, IPromise promise) { if (relativePath == null) { @@ -221,7 +221,7 @@ public async void readToFile(string relativePath, string storage, IPromise promi try { - string content = await readFile(relativePath, (Storage)Enum.Parse(typeof(Storage), storage)); + string content = await readFromFile(relativePath, (Storage)Enum.Parse(typeof(Storage), storage)); promise.Resolve(content); } catch (Exception ex)