mirror of
https://github.com/falk-werner/webfuse-provider
synced 2024-10-27 20:44:10 +00:00
removed some eslint warings
This commit is contained in:
parent
b1c72dab3c
commit
abb951c0c6
@ -1,3 +1,5 @@
|
|||||||
|
/* exported Connection */
|
||||||
|
|
||||||
class Connection {
|
class Connection {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
/* exported ConnectionView */
|
||||||
|
|
||||||
class ConnectionView {
|
class ConnectionView {
|
||||||
constructor(connection) {
|
constructor(connection) {
|
||||||
this.connection = connection;
|
this.connection = connection;
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
/* exported FileSystem */
|
||||||
|
/* eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }] */
|
||||||
|
|
||||||
class FileSystem {
|
class FileSystem {
|
||||||
static get GOOD() { return 0; }
|
static get GOOD() { return 0; }
|
||||||
static get BAD() { return 1; }
|
static get BAD() { return 1; }
|
||||||
@ -104,7 +107,7 @@ class FileSystem {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
close(inode, handle, mode) {
|
close(_inode, _handle, _mode) {
|
||||||
// do nothing
|
// do nothing
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
/* exported FileSystemHandler */
|
||||||
|
/* eslint no-console: "off" */
|
||||||
|
|
||||||
class FileSystemHandler {
|
class FileSystemHandler {
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "wsfs-provider",
|
"name": "wsfs-provider",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "Provider for websocket filesystem (wsfs)",
|
"description": "Provider for websocket filesystem (wsfs)",
|
||||||
"main": "filesystem.js",
|
"main": "startup.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
/* global Connection, ConnectionView, FileSystem, FileSystemHandler */
|
||||||
|
|
||||||
|
function mode(value) {
|
||||||
|
return parseInt(value, 8);
|
||||||
|
}
|
||||||
|
|
||||||
function startup() {
|
function startup() {
|
||||||
let connection = new Connection();
|
let connection = new Connection();
|
||||||
let connectionView = new ConnectionView(connection);
|
let connectionView = new ConnectionView(connection);
|
||||||
@ -5,16 +11,15 @@ function startup() {
|
|||||||
|
|
||||||
let fs = new FileSystem({
|
let fs = new FileSystem({
|
||||||
inode: 1,
|
inode: 1,
|
||||||
mode: 0755,
|
mode: mode("0755"),
|
||||||
type: "dir",
|
type: "dir",
|
||||||
entries: {
|
entries: {
|
||||||
"hello.txt" : { inode: 2, mode: 0444, type: "file", contents: "Hello, World!"},
|
"hello.txt" : { inode: 2, mode: mode("0444"), type: "file", contents: "Hello, World!"},
|
||||||
"say_hello.sh": { inode: 3, mode: 0555, type: "file", contents: "#!/bin/sh\necho hello\n"}
|
"say_hello.sh": { inode: 3, mode: mode("0555"), type: "file", contents: "#!/bin/sh\necho hello\n"}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let handler = new FileSystemHandler(fs, connection);
|
let handler = new FileSystemHandler(fs, connection);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
window.onload = startup;
|
window.onload = startup;
|
||||||
|
Loading…
Reference in New Issue
Block a user