From 47f48bae8d983a5c5c8fcdd2d44ba619b0b06608 Mon Sep 17 00:00:00 2001 From: Ibby Date: Wed, 1 Mar 2017 21:36:06 -0500 Subject: [PATCH] fix(file): fix writeExistingFile closes #1044 --- src/plugins/file.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/file.ts b/src/plugins/file.ts index 8566e2119..320717d4e 100644 --- a/src/plugins/file.ts +++ b/src/plugins/file.ts @@ -171,7 +171,6 @@ export interface Flags { } export interface WriteOptions { - create?: boolean; replace?: boolean; append?: boolean; truncate?: number; // if present, number of bytes to truncate file to before writing @@ -799,7 +798,7 @@ export class File { * @returns {Promise} Returns a Promise that resolves or rejects with an error. */ static writeExistingFile(path: string, fileName: string, text: string | Blob): Promise { - return File.writeFile(path, fileName, text, { create: false }); + return File.writeFile(path, fileName, text, { replace: true }); } /**