FileManager.getNewFileParent method
FileManager › getNewFileParent
Official
Gets the folder that new files should be saved to, given the user's preferences.Signature:
getNewFileParent(sourcePath: string, newFilePath?: string | undefined): TFolderParameters:
| Parameter | Type | Description |
|---|---|---|
| sourcePath | string | The 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. |
| newFilePath? | string | undefined | 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
Since: 1.1.13