deleteEmptyFolderHierarchy
Removes empty folder hierarchy starting from the given folder.
The walk stops at the first folder that is not empty or no longer exists on disk.
Import:
import { deleteEmptyFolderHierarchy } from '@mnaoumov/obsidian-lib/vault';Signature:
function deleteEmptyFolderHierarchy(app: App, pathOrFolder: PathOrFolder | null): Promise<void>Parameters:
| Parameter | Type | Description |
|---|---|---|
app |
App | The application instance. |
pathOrFolder |
PathOrFolder | null | The folder to start removing empty hierarchy from. |
Returns: Promise<void> — A Promise that resolves when the empty hierarchy is deleted.