33 lines
621 B
HTML
33 lines
621 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
</head>
|
|
<body>
|
|
<div id="stdout"></div>
|
|
</body>
|
|
<script src="../lib/require.js"></script>
|
|
<script>
|
|
require.config({
|
|
baseUrl: "../lib",
|
|
paths: {
|
|
"src": "../src"
|
|
}
|
|
});
|
|
|
|
require(["src/filesystem"], function(IDBFS) {
|
|
|
|
IDBFS.mount("default", function(error, fs) {
|
|
fs.mkdir("/tmp", function(error) {
|
|
fs.open("/tmp/0", "CREATE", "RW", function(error, fd) {
|
|
fs.dump(document.getElementById("stdout"));
|
|
fs.close(fd, function(error) {
|
|
console.log("finished!");
|
|
});
|
|
});
|
|
});
|
|
}, true);
|
|
|
|
});
|
|
</script>
|
|
</html> |