Skip to content

Vault.rename method

Vault › rename

Official

Rename or move a file. To ensure links are automatically renamed, use FileManager.renameFile instead.

Signature:

rename(file: TAbstractFile, newPath: string): Promise<void>

Parameters:

Parameter Type Description
file TAbstractFile the file to rename/move
newPath string vault absolute path to move file to.

Returns: Promise<void>

Since: 0.9.11