1
0
mirror of https://github.com/falk-werner/webfuse synced 2026-10-23 21:28:26 +00:00

add basic infrastructure of javascript example

This commit is contained in:
Falk Werner
2023-02-05 00:11:02 +01:00
parent 7783b294cc
commit 17d6275d96
10 changed files with 669 additions and 0 deletions

View File

@@ -0,0 +1,90 @@
import { ERRNO } from "./errno.js"
class BaseFileSystem {
access(path, mode) {
return ERRNO.ENOENT;
}
getattr(path) {
return ERRNO.ENOENT;
}
readlink(path) {
return ERRNO.ENOENT;
}
symlink(target, linkpath) {
return ERRNO.ENOENT;
}
link(oldpath, newpath) {
return ERRNO.ENOENT;
}
rename(oldpath, newpath, flags) {
return ERRNO.ENOENT;
}
chmod(path, mode) {
return ERRNO.ENOENT;
}
chown(path, uid, gid) {
return ERRNO.ENOENT;
}
truncate(path, size, fd) {
return ERRNO.ENOENT;
}
open(path, flags) {
return [ERRNO.ENOENT, 0];
}
mknod(path, mode, rdev) {
return ERRNO.ENOENT;
}
create(path, mode) {
return [ERNNO.ENOEND, 0];
}
release(path, fd) {
return ERRNO.ENOENT;
}
unlink(path) {
return ERRNO.ENOENT;
}
read(path, size, offset, fd) {
return ERRNO.ENOENT;
}
write(path, data, offset, fd) {
return ERRNO.ENOENT;
}
mkdir(path, mode) {
return ERRNO.ENOENT;
}
readdir(path) {
return ERRNO.ENOENT;
}
rmdir(path) {
return ERRNO.ENOENT;
}
statfs(path) {
return ERRNO.ENOENT;
}
getcreds() {
return "";
}
}
export { BaseFileSystem }