Skip to content

VaultTransaction.process method

VaultTransaction › process

Transforms the content of a file, capturing the old content so it can be restored on rollback.

Signature:

process(pathOrFile: PathOrAbstractFile, newContentProvider: (content: string) => string): Promise<void>

Parameters:

ParameterTypeDescription
pathOrFilePathOrAbstractFileThe path or file to process.
newContentProvider(content: string) => stringMaps the current content to the new content.

Returns: Promise<void>A Promise that resolves when the file is processed.