UpdateFileUrlLinksInFileParams
Params for updateFileUrlLinksInFile.
Import:
import type { UpdateFileUrlLinksInFileParams } from '@mnaoumov/obsidian-lib/link';Signature:
export interface UpdateFileUrlLinksInFileParams extends ProcessOptionsExtends: ProcessOptions
Properties
| Property | Type | Description |
|---|---|---|
| app | App | An Obsidian app instance. |
| offsetRange? | OffsetRange | A range within the file's content, in character offsets, restricting the pass to the links inside it. When omitted, every link is visited. A link is normalized only when it is **fully contained** in the range; one that merely overlaps it is left alone, because rewriting part of a link corrupts it. Both bounds are inclusive, so a range whose offsets coincide exactly with a link's does include that link. A reference that carries no position within the file's content — a frontmatter link, a multi-link frontmatter value entry, or any canvas reference — is never in range and is skipped whenever a range is supplied. The offsets are into the content this function reads from the vault. Before reading, it saves any unsaved editor buffer for the file, so a range taken from an open editor via Editor.posToOffset is valid. The caller owns only the case where the buffer changes between computing the range and this call. |
| pathOrFile | PathOrFile | The path or file to normalize the file:// links in. |
| pluginNoticeComponent | null | PluginNoticeComponent | Plugin notice component used to show the timeout notice. When null, no timeout notice is shown regardless of ProcessOptions.shouldShowTimeoutNotice; the timeout is only logged.(Inherited from ProcessOptions) |
| resourceLockComponent | null | ResourceLockComponent | An resource-lock component used to lock the file's editor read-only for the duration of processing. The lock is reference-counted, so it composes with any outer operation-level lock on the same note. (Inherited from ProcessOptions) |
| shouldFailOnMissingFile? | boolean | Whether to fail if the file is missing or deleted. (Inherited from ProcessOptions) |
| shouldShowTimeoutNotice? | boolean | Whether to show a timeout notice. (Inherited from ProcessOptions) |
| shouldUseAngleBrackets? | boolean | Whether to emit the normalized links with angle brackets and raw spaces instead of %20-encoding. |
Links to this page: