pub struct Note {
pub properties: BTreeMap<String, Value>,
pub name: String,
pub basename: String,
pub path: String,
pub folder: String,
pub ext: String,
pub size: u64,
pub ctime: Option<BaseDate>,
pub mtime: Option<BaseDate>,
pub tags: Vec<String>,
pub links: Vec<BaseLink>,
pub slug: String,
}Expand description
One note (markdown file) in the vault, queryable by a base.
Fields§
§properties: BTreeMap<String, Value>Frontmatter properties, keyed by name, coerced to typed values. Accessed
via note.<name> or a bare <name> in expressions.
name: Stringfile.name — filename with extension (e.g. Intro.md).
basename: Stringfile.basename — filename without extension.
path: Stringfile.path — full vault-relative path (e.g. guide/Intro.md).
folder: Stringfile.folder — containing folder path (empty for root).
ext: Stringfile.ext — extension without the dot (md).
size: u64file.size — byte length of the source file.
ctime: Option<BaseDate>file.ctime — creation time, if known.
mtime: Option<BaseDate>file.mtime — modification time, if known.
file.tags — all #tags (frontmatter + body), without the leading #.
links: Vec<BaseLink>file.links — outbound internal link targets.
slug: StringThe doc’s site slug (docgen-specific; used to build the cell hyperlink to the rendered page). Not exposed as a base property.
Implementations§
Source§impl Note
impl Note
Sourcepub fn file_property(&self, field: &str) -> Value
pub fn file_property(&self, field: &str) -> Value
Resolve a file.<field> access to a value. Unknown fields → Null.
Sourcepub fn note_property(&self, name: &str) -> Value
pub fn note_property(&self, name: &str) -> Value
Resolve a bare/note. property. Unknown → Null.
Sourcepub fn has_tag(&self, want: &str) -> bool
pub fn has_tag(&self, want: &str) -> bool
Whether this note has any of tags (Obsidian’s file.hasTag matches a tag
or any of its parents: a note tagged #a/b matches hasTag("a")).