<html>
<head>
<title>File System Example</title>
<script type="text/javascript" charset="utf-8" src="cordova-2.0.0.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for Cordova to load
//
document.addEventListener("deviceready", onDeviceReady, false);
// Cordova is ready
//
function onDeviceReady() {
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, fail);
}
function onFileSystemSuccess(fileSystem) {
document.getElementById("fileSystem").textContent="fileSystem:" + fileSystem.name;
document.getElementById("fileSystemRoot").textContent="fileSystemRoot:" + fileSystem.root.name;
}
function fail(error) {
console.log(error.code);
}
</script>
</head>
<body>
<h1>Example</h1>
<p>File System</p>
<div id = "fileSystem"><div>
<div id = "fileSystemRoot"><div>
</body>
</html>