GetAvailablePathForAttachmentsExtendedFnParams
Options for the get available path for attachments extended function.
Import:
import type { GetAvailablePathForAttachmentsExtendedFnParams } from 'obsidian-dev-utils/obsidian/attachment-path';Signature:
export interface GetAvailablePathForAttachmentsExtendedFnParamsProperties
| Property | Type | Description |
|---|---|---|
| attachmentFileBaseName | string | A base name of the attachment. |
| attachmentFileExtension | string | An extension of the attachment. |
| attachmentFileStats? | FileStats | undefined | A stats of the attachment file. |
| context | AttachmentPathContext | A context. |
| notePathOrFile | null | PathOrFile | A path or file of the note. |
| oldAttachmentPathOrFile | PathOrFile | A path or file of the old attachment. |
| oldNotePathOrFile? | PathOrFile | undefined | A path or file of the old note. |
| readAttachmentFileContent | (() => Promise<ArrayBuffer>) | null | Lazily reads the content of the attachment file. The content is read on demand only when a consumer actually needs the bytes (e.g. a template token that embeds them). For the default templates nothing pulls the bytes, so the potentially expensive (size-proportional) readBinary never runs. Consumers that may call this more than once should memoize the first call. null when there is no attachment file to read. |
| shouldSkipDuplicateCheck? | boolean | Should the duplicate check be skipped. |
| shouldSkipGeneratedAttachmentFileName? | boolean | Should the generated attachment file name be skipped. |
| shouldSkipMissingAttachmentFolderCreation | boolean | undefined | Should missing attachment folder creation be skipped. |