Creates an instance of MetadataService.
The Obsidian MetadataCache instance to operate on.
Retrieves the YAML frontmatter from a file.
The TFile to retrieve YAML frontmatter from.
The YAML frontmatter as a string, or null if not found.
Retrieves the frontmatter metadata from a file.
The TFile to retrieve frontmatter from.
The frontmatter as a record of key-value pairs, or undefined if not found.
Service class for managing metadata in Obsidian files. Encapsulates metadata operations to facilitate testing and decouple from direct API usage.