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-11-08 05:12:41 +00:00
|
|
|
require(["src/fs"], function(IDBFS) {
|
2012-10-11 06:20:58 +00:00
|
|
|
|
2012-11-08 05:12:41 +00:00
|
|
|
IDBFS.mount("default", "FORMAT", function(error, fs) {
|
|
|
|
if(error) {
|
2012-11-09 16:10:55 +00:00
|
|
|
return console.error(error);
|
2012-11-08 05:12:41 +00:00
|
|
|
}
|
|
|
|
fs.mkdir("/tmp", function() {
|
2012-11-08 10:29:05 +00:00
|
|
|
if(error) {
|
2012-11-09 16:10:55 +00:00
|
|
|
return console.error(error);
|
2012-11-08 10:29:05 +00:00
|
|
|
}
|
|
|
|
fs.stat("/tmp", function(error, result) {
|
|
|
|
if(error) {
|
2012-11-09 16:10:55 +00:00
|
|
|
return console.error(error);
|
2012-11-08 10:29:05 +00:00
|
|
|
}
|
|
|
|
console.info(result);
|
2012-11-09 16:10:55 +00:00
|
|
|
fs.open("/tmp/0", "create", "rw", function(error, fd) {
|
|
|
|
if(error) {
|
|
|
|
return console.error(error);
|
|
|
|
}
|
|
|
|
console.info(fd._openfile._handle);
|
|
|
|
fs.close(fd, function(error) {
|
|
|
|
if(error) {
|
|
|
|
return console.error(error);
|
|
|
|
}
|
|
|
|
console.info("done");
|
|
|
|
});
|
|
|
|
});
|
2012-11-08 10:29:05 +00:00
|
|
|
});
|
2012-10-11 06:20:58 +00:00
|
|
|
});
|
2012-11-08 05:12:41 +00:00
|
|
|
});
|
2012-10-11 06:20:58 +00:00
|
|
|
|
2012-10-07 05:42:58 +00:00
|
|
|
});
|
|
|
|
</script>
|
2012-10-15 15:33:56 +00:00
|
|
|
</html>
|