added tests to use the LocalFileSystem enum

This commit is contained in:
grippstick
2016-08-30 13:50:41 -05:00
committed by GitHub
parent e729485568
commit 6a189e5a5f

View File

@@ -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)=> {