small fixes on example

This commit is contained in:
timurgordon
2025-02-18 05:22:38 +03:00
parent 906f13b562
commit 6305cf159e
3 changed files with 8 additions and 8 deletions

View File

@@ -111,8 +111,8 @@ pub fn (mut self NestedVFS) dir_delete(path string) ! {
return impl.dir_delete(rel_path)
}
pub fn (mut self NestedVFS) exists(path string) !bool {
mut impl, rel_path := self.find_vfs(path)!
pub fn (mut self NestedVFS) exists(path string) bool {
mut impl, rel_path := self.find_vfs(path) or {return false}
return impl.exists(rel_path)
}

View File

@@ -96,7 +96,7 @@ pub fn (mut self OurDBVFS) dir_delete(path string) ! {
parent_dir.rm(dir_name)!
}
pub fn (mut self OurDBVFS) exists(path string) !bool {
pub fn (mut self OurDBVFS) exists(path string) bool {
if path == '/' {
return true
}