Files
herolib/lib/vfs/vfs_local/model_fsentry.v
Mahmoud Emad 2335d14623 refactor: Remove unnecessary import in local filesystem model
- Removed unused `os` import from `model_fsentry.v`. This
  improves code clarity and reduces unnecessary dependencies.

- Updated `vfs_implementation_test.v` to use the correct
  import paths for mail-related modules.
2025-03-26 12:15:38 +02:00

34 lines
738 B
V

module vfs_local
import freeflowuniverse.herolib.vfs
// LocalFSEntry implements FSEntry for local filesystem
struct LocalFSEntry {
mut:
path string
metadata vfs.Metadata
}
// is_dir returns true if the entry is a directory
pub fn (self &LocalFSEntry) is_dir() bool {
return self.metadata.file_type == .directory
}
// is_file returns true if the entry is a file
pub fn (self &LocalFSEntry) is_file() bool {
return self.metadata.file_type == .file
}
// is_symlink returns true if the entry is a symlink
pub fn (self &LocalFSEntry) is_symlink() bool {
return self.metadata.file_type == .symlink
}
fn (e LocalFSEntry) get_metadata() vfs.Metadata {
return e.metadata
}
fn (e LocalFSEntry) get_path() string {
return e.path
}