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.
falk-werner_webfuse/example/daemon/www/js/startup.js

26 lines
814 B

import { Client } from "./webfuse/client.js";
import { ConnectionView } from "./connection_view.js";
import { FileSystemProvider } from "./filesystem_provider.js";
function mode(value) {
return parseInt(value, 8);
}
6 years ago
function startup() {
const provider = new FileSystemProvider({
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
}
});
const client = new Client(provider);
const connectionView = new ConnectionView(client);
document.getElementById('connection').appendChild(connectionView.element);
6 years ago
}
window.onload = startup;