Skip to content

vfs.vfsourdb #

VFS Overlay of OURDb

use the ourdb_fs implementation underneith which speaks with the ourdb

this is basically a filesystem interface for storing files into an ourdb.

fn new #

fn new(data_dir string, metadata_dir string) !&OurDBVFS

new creates a new OurDBVFS instance

struct OurDBVFS #

struct OurDBVFS {
mut:
	core &ourdb_fs.VFS
}

OurDBVFS represents a VFS that uses OurDB as the underlying storage

fn (OurDBVFS) root_get #

fn (mut self OurDBVFS) root_get() !vfscore.FSEntry

Implementation of VFSImplementation interface

fn (OurDBVFS) file_create #

fn (mut self OurDBVFS) file_create(path string) !vfscore.FSEntry

fn (OurDBVFS) file_read #

fn (mut self OurDBVFS) file_read(path string) ![]u8

fn (OurDBVFS) file_write #

fn (mut self OurDBVFS) file_write(path string, data []u8) !

fn (OurDBVFS) file_delete #

fn (mut self OurDBVFS) file_delete(path string) !

fn (OurDBVFS) dir_create #

fn (mut self OurDBVFS) dir_create(path string) !vfscore.FSEntry

fn (OurDBVFS) dir_list #

fn (mut self OurDBVFS) dir_list(path string) ![]vfscore.FSEntry

fn (OurDBVFS) dir_delete #

fn (mut self OurDBVFS) dir_delete(path string) !

fn (OurDBVFS) exists #

fn (mut self OurDBVFS) exists(path string) !bool

fn (OurDBVFS) get #

fn (mut self OurDBVFS) get(path string) !vfscore.FSEntry

fn (OurDBVFS) rename #

fn (mut self OurDBVFS) rename(old_path string, new_path string) !

fn (OurDBVFS) copy #

fn (mut self OurDBVFS) copy(src_path string, dst_path string) !

fn (OurDBVFS) destroy #

fn (mut self OurDBVFS) destroy() !