Files
herolib/examples/webdav/webdav_vfs.vsh
despiegk 26289bb00f Merge branch 'development_actions007' into development_ourdb_new
# Conflicts:
#	lib/data/dedupestor/dedupestor.v
#	lib/data/dedupestor/dedupestor_test.v
2025-03-09 19:07:12 +01:00

28 lines
1.0 KiB
GLSL
Executable File

#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
// import freeflowuniverse.herolib.vfs.webdav
import freeflowuniverse.herolib.vfs.vfs_nested
import freeflowuniverse.herolib.vfs.vfs_core
import freeflowuniverse.herolib.vfs.vfs_ourdb
mut high_level_vfs := vfsnested.new()
// lower level VFS Implementations that use OurDB
mut vfs1 := vfsourdb.new('/tmp/test_webdav_ourdbvfs/vfs1', '/tmp/test_webdav_ourdbvfs/vfs1')!
mut vfs2 := vfsourdb.new('/tmp/test_webdav_ourdbvfs/vfs2', '/tmp/test_webdav_ourdbvfs/vfs2')!
mut vfs3 := vfsourdb.new('/tmp/test_webdav_ourdbvfs/vfs3', '/tmp/test_webdav_ourdbvfs/vfs3')!
// Nest OurDB VFS instances at different paths
high_level_vfs.add_vfs('/data', vfs1) or { panic(err) }
high_level_vfs.add_vfs('/config', vfs2) or { panic(err) }
high_level_vfs.add_vfs('/data/backup', vfs3) or { panic(err) } // Nested under /data
// // Create WebDAV Server that uses high level VFS
// mut webdav_server := webdav.new_app(
// vfs: high_level_vfs
// user_db: {
// 'omda': '123'
// }
// )!
// webdav_server.run()