(fileName: string, exportPath: string)
| 19 | } |
| 20 | |
| 21 | private async getExportPath(fileName: string, exportPath: string): Promise<string> { |
| 22 | if (!exportPath) { |
| 23 | return fileName; |
| 24 | } |
| 25 | |
| 26 | const folderPath = this.app.vault.getAbstractFileByPath(exportPath); |
| 27 | if (!folderPath) { |
| 28 | await this.app.vault.createFolder(exportPath); |
| 29 | } |
| 30 | |
| 31 | return `${exportPath}/${fileName}`; |
| 32 | } |
| 33 | } |