diff --git a/examples/vfs/example.vsh b/examples/webdav/webdav_vfs.vsh similarity index 100% rename from examples/vfs/example.vsh rename to examples/webdav/webdav_vfs.vsh diff --git a/lib/vfs/vfsnested/vfsnested.v b/lib/vfs/vfsnested/vfsnested.v index dae8b083..e4ab06ce 100644 --- a/lib/vfs/vfsnested/vfsnested.v +++ b/lib/vfs/vfsnested/vfsnested.v @@ -5,7 +5,7 @@ import freeflowuniverse.herolib.vfs.vfscore // NestedVFS represents a VFS that can contain multiple nested VFS instances pub struct NestedVFS { mut: - vfs_map map[string]vfscore.VFSImplementation // Map of path prefixes to VFS implementations + vfs_map map[string]vfscore.VFSImplementation @[skip] // Map of path prefixes to VFS implementations } // new creates a new NestedVFS instance diff --git a/lib/vfs/webdav/app.v b/lib/vfs/webdav/app.v index 166a603a..21d0d774 100644 --- a/lib/vfs/webdav/app.v +++ b/lib/vfs/webdav/app.v @@ -8,10 +8,9 @@ import freeflowuniverse.herolib.vfs.vfscore struct App { vweb.Context user_db map[string]string @[required] - // root_dir pathlib.Path @[vweb_global] pub mut: lock_manager LockManager - vfs vfscore.VFSImplementation + vfs vfscore.VFSImplementation @[vweb_global] server_port int middlewares map[string][]vweb.Middleware } @@ -20,16 +19,13 @@ pub mut: pub struct AppArgs { pub mut: server_port int = 8080 - // root_dir string @[required] - user_db map[string]string @[required] - vfs vfscore.VFSImplementation + user_db map[string]string @[required] + vfs vfscore.VFSImplementation } pub fn new_app(args AppArgs) !&App { - // root_dir := pathlib.get_dir(path: args.root_dir, create: true)! mut app := &App{ - user_db: args.user_db.clone() - // root_dir: root_dir + user_db: args.user_db.clone() server_port: args.server_port vfs: args.vfs } diff --git a/lib/vfs/webdav/methods.v b/lib/vfs/webdav/methods.v index e8a76aa5..5e199f7e 100644 --- a/lib/vfs/webdav/methods.v +++ b/lib/vfs/webdav/methods.v @@ -1,11 +1,8 @@ module webdav -import freeflowuniverse.herolib.core.pathlib import freeflowuniverse.herolib.ui.console -import freeflowuniverse.herolib.vfs.ourdb_fs import encoding.xml import net.urllib -import os import vweb @['/:path...'; options]