From 6a189e5a5f8582c2bc1df6be6592cdb8a0837f92 Mon Sep 17 00:00:00 2001 From: grippstick Date: Tue, 30 Aug 2016 13:50:41 -0500 Subject: [PATCH] added tests to use the LocalFileSystem enum --- cordova/cordova-tests.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/cordova/cordova-tests.ts b/cordova/cordova-tests.ts index 7e97305a25..6d98471b12 100644 --- a/cordova/cordova-tests.ts +++ b/cordova/cordova-tests.ts @@ -126,12 +126,27 @@ function fsaccessor(fs: FileSystem) { (err: FileError)=> { alert('Error: ' + err.code); }); } + + +//---------------------------------------------------------------------- +// FileSystem plugin +// +//cordova states that the enums for requestFileSystem live on LocalFileSystem +// window.requestFileSystem( - window.TEMPORARY, + LocalFileSystem.TEMPORARY, 1024 * 1024 * 5, fsaccessor, (err: FileError) => { alert('Error: ' + err.code); } ); +window.requestFileSystem( + LocalFileSystem.PERSISTENT, + 1024 * 1024 * 5, + fsaccessor, + (err: FileError) => { alert('Error: ' + err.code); } +); +// FileSystem plugin +//---------------------------------------------------------------------- window.resolveLocalFileSystemURI(cordova.file.applicationDirectory, (entry: Entry)=> {