mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-19 13:32:17 +08:00
added tests to use the LocalFileSystem enum
This commit is contained in:
@@ -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)=> {
|
||||
|
||||
Reference in New Issue
Block a user