FileValue
Official
Value wrapping a file in Obsidian.
Import:
import { FileValue } from 'obsidian';Signature:
export class FileValue extends NotNullValueExtends: NotNullValue
Constructor
new FileValue(app: App, file: TFile)Constructor.
To get the constructor instance, use getFileValueConstructor from obsidian-typings/implementations.
Properties
| Property | Type | Description | |
|---|---|---|---|
| app | App | Reference to the app instance. | |
| file | TFile | The wrapped file. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| getBacklinks() | ListValue | Gets the backlinks to the file as a list of LinkValues. | |
| getEmbeds() | ListValue | Gets the embeds in the file as a list of LinkValues. | |
| getLinks() | ListValue | Gets the outgoing links in the file as a list of LinkValues. | |
| getProps() | ObjectValue | Gets the file's frontmatter properties. | |
| getTags() | ListValue | Gets the tags in the file as a list of TagValues. | |
| isTruthy() | boolean | Returns a boolean indicating whether this obsidian#FileValue is truthy. | |
| toString() | string | String representation of this obsidian#FileValue. |
Links to this page: