vfs.vfs_mail #
fn new #
fn new(mail_db &core.MailDB) !vfs.VFSImplementation
new creates a new mail VFS instance
fn new_mail_vfs #
fn new_mail_vfs(mail_db &core.MailDB) !vfs.VFSImplementation
new_mail_vfs creates a new mail VFS
struct MailFSEntry #
struct MailFSEntry {
pub mut:
path string
metadata vfs.Metadata
email ?mail.Email
}
MailFSEntry implements FSEntry for mail objects
fn (MailFSEntry) is_dir #
fn (self &MailFSEntry) is_dir() bool
is_dir returns true if the entry is a directory
fn (MailFSEntry) is_file #
fn (self &MailFSEntry) is_file() bool
is_file returns true if the entry is a file
fn (MailFSEntry) is_symlink #
fn (self &MailFSEntry) is_symlink() bool
is_symlink returns true if the entry is a symlink
fn (MailFSEntry) get_metadata #
fn (e MailFSEntry) get_metadata() vfs.Metadata
fn (MailFSEntry) get_path #
fn (e MailFSEntry) get_path() string
struct MailVFS #
struct MailVFS {
pub mut:
mail_db &core.MailDB
}
MailVFS implements the VFS interface for mail objects
fn (MailVFS) copy #
fn (mut myvfs MailVFS) copy(src_path string, dst_path string) !vfs.FSEntry
fn (MailVFS) delete #
fn (mut myvfs MailVFS) delete(path string) !
fn (MailVFS) destroy #
fn (mut myvfs MailVFS) destroy() !
Cleanup operation
fn (MailVFS) dir_create #
fn (mut myvfs MailVFS) dir_create(path string) !vfs.FSEntry
Directory operations
fn (MailVFS) dir_delete #
fn (mut myvfs MailVFS) dir_delete(path string) !
fn (MailVFS) dir_list #
fn (mut myvfs MailVFS) dir_list(path string) ![]vfs.FSEntry
fn (MailVFS) exists #
fn (mut myvfs MailVFS) exists(path string) bool
Common operations
fn (MailVFS) file_concatenate #
fn (mut myvfs MailVFS) file_concatenate(path string, data []u8) !
fn (MailVFS) file_create #
fn (mut myvfs MailVFS) file_create(path string) !vfs.FSEntry
File operations
fn (MailVFS) file_delete #
fn (mut myvfs MailVFS) file_delete(path string) !
fn (MailVFS) file_read #
fn (mut myvfs MailVFS) file_read(path string) ![]u8
fn (MailVFS) file_write #
fn (mut myvfs MailVFS) file_write(path string, data []u8) !
fn (MailVFS) get #
fn (mut myvfs MailVFS) get(path string) !vfs.FSEntry
fn (MailVFS) get_path #
fn (mut myvfs MailVFS) get_path(entry &vfs.FSEntry) !string
FSEntry Operations
fn (MailVFS) link_create #
fn (mut myvfs MailVFS) link_create(target_path string, link_path string) !vfs.FSEntry
Symlink operations
fn (MailVFS) link_delete #
fn (mut myvfs MailVFS) link_delete(path string) !
fn (MailVFS) link_read #
fn (mut myvfs MailVFS) link_read(path string) !string
fn (MailVFS) move #
fn (mut myvfs MailVFS) move(src_path string, dst_path string) !vfs.FSEntry
fn (MailVFS) print #
fn (mut myvfs MailVFS) print() !
fn (MailVFS) rename #
fn (mut myvfs MailVFS) rename(old_path string, new_path string) !vfs.FSEntry
fn (MailVFS) root_get #
fn (mut myvfs MailVFS) root_get() !vfs.FSEntry
Basic operations