deleteEmptyFolder
Deletes an empty folder.
A folder the vault index still holds but the disk has already lost is not empty: it is nothing to delete, so it is left alone rather than handed to the trash as a missing path.
Import:
import { deleteEmptyFolder } from '@mnaoumov/obsidian-lib/vault';Signature:
function deleteEmptyFolder(app: App, pathOrFolder: PathOrFolder | null): Promise<void>Parameters:
| Parameter | Type | Description |
|---|---|---|
app |
App | The application instance. |
pathOrFolder |
PathOrFolder | null | The folder to delete. |
Returns: Promise<void> — A Promise that resolves when the folder is deleted.