You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
759 B

/* global Connection, ConnectionView, FileSystem, FileSystemHandler */
function mode(value) {
return parseInt(value, 8);
}
6 years ago
function startup() {
let connection = new Connection();
let connectionView = new ConnectionView(connection);
6 years ago
document.getElementById('connection').appendChild(connectionView.element);
6 years ago
let fs = new FileSystem({
inode: 1,
mode: mode("0755"),
6 years ago
type: "dir",
entries: {
"hello.txt" : { inode: 2, mode: mode("0444"), type: "file", contents: "Hello, World!"},
"say_hello.sh": { inode: 3, mode: mode("0555"), type: "file", contents: "#!/bin/sh\necho hello\n"}
6 years ago
}
});
let handler = new FileSystemHandler(fs, connection);
6 years ago
}
window.onload = startup;