vfs.vfsnested #
VFS Overlay
This virtual filesystem combines multiple other VFS'es
fn new #
fn new() &NestedVFS
new creates a new NestedVFS instance
struct MountEntry #
struct MountEntry {
pub mut:
metadata vfscore.Metadata
impl vfscore.VFSImplementation
}
struct NestedVFS #
struct NestedVFS {
mut:
vfs_map map[string]vfscore.VFSImplementation // Map of path prefixes to VFS implementations
}
NestedVFS represents a VFS that can contain multiple nested VFS instances
fn (NestedVFS) add_vfs #
fn (mut self NestedVFS) add_vfs(prefix string, impl vfscore.VFSImplementation) !
add_vfs adds a new VFS implementation at the specified path prefix
fn (NestedVFS) root_get #
fn (mut self NestedVFS) root_get() !vfscore.FSEntry
Implementation of VFSImplementation interface
fn (NestedVFS) file_create #
fn (mut self NestedVFS) file_create(path string) !vfscore.FSEntry
fn (NestedVFS) file_read #
fn (mut self NestedVFS) file_read(path string) ![]u8
fn (NestedVFS) file_write #
fn (mut self NestedVFS) file_write(path string, data []u8) !
fn (NestedVFS) file_delete #
fn (mut self NestedVFS) file_delete(path string) !
fn (NestedVFS) dir_create #
fn (mut self NestedVFS) dir_create(path string) !vfscore.FSEntry
fn (NestedVFS) dir_list #
fn (mut self NestedVFS) dir_list(path string) ![]vfscore.FSEntry
fn (NestedVFS) dir_delete #
fn (mut self NestedVFS) dir_delete(path string) !
fn (NestedVFS) exists #
fn (mut self NestedVFS) exists(path string) !bool
fn (NestedVFS) get #
fn (mut self NestedVFS) get(path string) !vfscore.FSEntry
fn (NestedVFS) rename #
fn (mut self NestedVFS) rename(old_path string, new_path string) !
fn (NestedVFS) copy #
fn (mut self NestedVFS) copy(src_path string, dst_path string) !
fn (NestedVFS) link_create #
fn (mut self NestedVFS) link_create(target_path string, link_path string) !vfscore.FSEntry
fn (NestedVFS) link_read #
fn (mut self NestedVFS) link_read(path string) !string
fn (NestedVFS) destroy #
fn (mut self NestedVFS) destroy() !