FileManagergetNewFileParent

FileManager.getNewFileParent() method

Gets the folder that new files should be saved to, given the user’s preferences.

Signature:

getNewFileParent(sourcePath: string, newFilePath?: string): TFolder;

Parameters

ParameterTypeDescription
sourcePathstringThe path to the current open/focused file, used when the user wants new files to be created ‘in the same folder’. Use an empty string if there is no active file.
newFilePathstring(Optional) The path to the file that will be newly created, used to infer what settings to use based on the path’s extension.

Returns:

TFolder