<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[`Vault`](Vault) › [`process`](Vault/process)
## Vault.process() method
Atomically read, modify, and save the contents of a note.
**Signature:**
```typescript
process(file: TFile, fn: (data: string) => string, options?: DataWriteOptions): Promise<string>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| <code>file</code> | [`TFile`](TFile) | the file to be read and modified. |
| <code>fn</code> | <code>(data: string) => string</code> | a callback function which returns the new content of the note synchronously. |
| <code>options</code> | [`DataWriteOptions`](DataWriteOptions) | _(Optional)_ write options. |
**Returns:**
`Promise<string>`
string - the text value of the note that was written.
## Example
```ts
app.vault.process(file, (data) => {
return data.replace('Hello', 'World');
});
```
Not found
This page does not exist