Skip to content

IsTreatedAsAttachmentParams

Parameters for isTreatedAsAttachment.

Import:

import type { IsTreatedAsAttachmentParams } from '@mnaoumov/obsidian-lib/file-system';

Signature:

export interface IsTreatedAsAttachmentParams

Properties

PropertyTypeDescription
app?AppThe Obsidian app instance, which lets a property: entry of attachmentExtensions read the file's frontmatter from the metadata cache. Without it, property: entries match nothing and only the extension entries are evaluated.
attachmentExtensionsreadonly string[]The entries that mark a file as an attachment, e.g. ['.excalidraw.md', 'property:excalidraw-plugin'].

An extension entry is normalized before matching: surrounding whitespace is trimmed, a single leading dot is enforced, and the comparison is case-insensitive. Empty entries are ignored.

A property:name entry matches a markdown file whose frontmatter has name, and property:name=value one whose name renders as value — the same syntax note priorities use. It is evaluated only when app is given.
pathOrFilenull | PathOrAbstractFileThe path or file to classify.

Links to this page: