entry.getDirectory("tmp", {create: false, exclusive: false}, success, fail);window.requestFileSystem(LocalFileSystem.TEMPORARY, 0, onSuccess, onError);
and the onSuccess() method will be called with a FileSystem object.
From the FileSystem object you can access the root property which is
of type DirectoryEntry. In this case that should by your apps
temporary directory.
Simon Mac Donald
http://hi.im/simonmacdonald
> --
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
>
> For more info on PhoneGap or to download the code go to www.phonegap.com
function success(entries) {
var i;
for (i=0; i<entries.length; i++) {
console.log(entries[i].name);
}
}
function fail(error) {
alert("Failed to list directory contents: " + error.code);
}
function onFileSystemTemporarySuccess(fileSystem) {
console.log(fileSystem.root.name);
// Get the directory
var directory = fileSystem.root;
// Get a directory reader
var directoryReader = directory.createReader();
// Get a list of all the entries in the directory
directoryReader.readEntries(success,fail);
}
function failedFileSystem(evt) {
console.log(evt.target.error.code);
}
function getFileSystem() {
window.requestFileSystem(LocalFileSystem.TEMPORARY, 0, onFileSystemTemporarySuccess, failedFileSystem);
}