vfs.vfs_calendar #
fn new #
fn new(calendar_db &core.CalendarDB) !vfs.VFSImplementation
new creates a new calendar_db VFS instance
fn new_calendar_vfs #
fn new_calendar_vfs(calendar_db &core.CalendarDB) !vfs.VFSImplementation
new_calendar_vfs creates a new contacts VFS
struct CalendarFSEntry #
struct CalendarFSEntry {
pub mut:
path string
metadata vfs.Metadata
calendar ?calendars.CalendarEvent
}
CalendarFSEntry represents a file system entry in the calendar VFS
fn (CalendarFSEntry) is_dir #
fn (self &CalendarFSEntry) is_dir() bool
is_dir returns true if the entry is a directory
fn (CalendarFSEntry) is_file #
fn (self &CalendarFSEntry) is_file() bool
is_file returns true if the entry is a file
fn (CalendarFSEntry) is_symlink #
fn (self &CalendarFSEntry) is_symlink() bool
is_symlink returns true if the entry is a symlink
fn (CalendarFSEntry) get_metadata #
fn (e CalendarFSEntry) get_metadata() vfs.Metadata
get_metadata returns the entry's metadata
fn (CalendarFSEntry) get_path #
fn (e CalendarFSEntry) get_path() string
get_path returns the entry's path
struct CalendarVFS #
struct CalendarVFS {
pub mut:
calendar_db &core.CalendarDB // Reference to the calendar database
}
CalendarVFS represents the virtual file system for calendar data It provides a read-only view of calendar data organized by calendars
fn (CalendarVFS) copy #
fn (mut myvfs CalendarVFS) copy(src_path string, dst_path string) !vfs.FSEntry
fn (CalendarVFS) delete #
fn (mut myvfs CalendarVFS) delete(path string) !
fn (CalendarVFS) destroy #
fn (mut myvfs CalendarVFS) destroy() !
Cleanup operation
fn (CalendarVFS) dir_create #
fn (mut myvfs CalendarVFS) dir_create(path string) !vfs.FSEntry
Directory operations
fn (CalendarVFS) dir_delete #
fn (mut myvfs CalendarVFS) dir_delete(path string) !
fn (CalendarVFS) dir_list #
fn (mut myvfs CalendarVFS) dir_list(path string) ![]vfs.FSEntry
fn (CalendarVFS) exists #
fn (mut myvfs CalendarVFS) exists(path string) bool
Common operations
fn (CalendarVFS) file_concatenate #
fn (mut myvfs CalendarVFS) file_concatenate(path string, data []u8) !
fn (CalendarVFS) file_create #
fn (mut myvfs CalendarVFS) file_create(path string) !vfs.FSEntry
File operations
fn (CalendarVFS) file_delete #
fn (mut myvfs CalendarVFS) file_delete(path string) !
fn (CalendarVFS) file_read #
fn (mut myvfs CalendarVFS) file_read(path string) ![]u8
fn (CalendarVFS) file_write #
fn (mut myvfs CalendarVFS) file_write(path string, data []u8) !
fn (CalendarVFS) get #
fn (mut myvfs CalendarVFS) get(path string) !vfs.FSEntry
fn (CalendarVFS) get_path #
fn (mut myvfs CalendarVFS) get_path(entry &vfs.FSEntry) !string
FSEntry Operations
fn (CalendarVFS) link_create #
fn (mut myvfs CalendarVFS) link_create(target_path string, link_path string) !vfs.FSEntry
Symlink operations
fn (CalendarVFS) link_delete #
fn (mut myvfs CalendarVFS) link_delete(path string) !
fn (CalendarVFS) link_read #
fn (mut myvfs CalendarVFS) link_read(path string) !string
fn (CalendarVFS) move #
fn (mut myvfs CalendarVFS) move(src_path string, dst_path string) !vfs.FSEntry
fn (CalendarVFS) print #
fn (mut myvfs CalendarVFS) print() !
fn (CalendarVFS) rename #
fn (mut myvfs CalendarVFS) rename(old_path string, new_path string) !vfs.FSEntry
fn (CalendarVFS) root_get #
fn (mut myvfs CalendarVFS) root_get() !vfs.FSEntry
Basic operations