2012-10-07 05:42:58 +00:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
</head>
|
2012-10-11 06:20:58 +00:00
|
|
|
<body>
|
|
|
|
<div id="stdout"></div>
|
|
|
|
</body>
|
2012-10-07 05:42:58 +00:00
|
|
|
<script src="../lib/require.js"></script>
|
|
|
|
<script>
|
|
|
|
require.config({
|
|
|
|
baseUrl: "../lib",
|
|
|
|
paths: {
|
|
|
|
"src": "../src"
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2012-10-11 06:20:58 +00:00
|
|
|
require(["../../javascript-debug/debug", "src/filesystem"], function(debug, IDBFS) {
|
|
|
|
|
|
|
|
IDBFS.mount("default", function(error, fs) {
|
|
|
|
console.log("mount complete");
|
|
|
|
fs.mkdir("/tmp", function(error) {
|
|
|
|
fs.dump(document.getElementById("stdout"));
|
|
|
|
});
|
|
|
|
}, true);
|
|
|
|
|
|
|
|
/*
|
|
|
|
var fs = new IdbFS(undefined, true);
|
2012-10-07 05:42:58 +00:00
|
|
|
fs.then(function(fs) {
|
2012-10-11 06:20:58 +00:00
|
|
|
fs.mkdir("/tmp").then(function(result) {
|
|
|
|
var d = fs.open("/tmp/0", IdbFS.O_CREATE, IdbFS.FMODE_RW);
|
|
|
|
d.then(function(fd) {
|
|
|
|
fs.dump(document.getElementById("stdout"));
|
|
|
|
}, function(e) {
|
|
|
|
console.log(e);
|
|
|
|
});
|
|
|
|
}, function(error) {
|
|
|
|
console.log(error);
|
|
|
|
});
|
2012-10-09 17:40:25 +00:00
|
|
|
fs.stat("/tmp").then(function(result) {
|
|
|
|
console.log(result);
|
2012-10-11 06:20:58 +00:00
|
|
|
}, function(error) {
|
|
|
|
console.log(error);
|
|
|
|
});
|
2012-10-07 05:42:58 +00:00
|
|
|
});
|
2012-10-11 06:20:58 +00:00
|
|
|
*/
|
|
|
|
|
2012-10-07 05:42:58 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</html>
|