Skip to content

FileManager.createNewMarkdownFile method

FileManager › createNewMarkdownFile

Unofficial

Creates a new Markdown file in the vault at specified location.

Signature:

createNewMarkdownFile(location: TFolder, filename: string, contents: string): Promise<TFile>

Parameters:

ParameterTypeDescription
locationTFolderLocation to create the file in.
filenamestringName of the file to create.
contentsstringContents of the file to create.

Returns: Promise<TFile>A promise that resolves to the new file.