( root: string, topFolder: NoteFolder, subpath: string )
| 3356 | * and it just works). |
| 3357 | */ |
| 3358 | export async function createFolder( |
| 3359 | root: string, |
| 3360 | topFolder: NoteFolder, |
| 3361 | subpath: string |
| 3362 | ): Promise<void> { |
| 3363 | const trimmed = subpath.replace(/^\/+|\/+$/g, '') |
| 3364 | if (!trimmed) throw new Error('Folder name is required') |
| 3365 | const abs = resolveSafe(await folderRoot(root, topFolder), trimmed) |
| 3366 | await fs.mkdir(abs, { recursive: true }) |
| 3367 | } |
| 3368 | |
| 3369 | /** |
| 3370 | * Rename or move a subfolder. `newSubpath` is the full target path |
no test coverage detected