• Removes a directory

    Parameters

    • dirPath: string

      Path of the directory to remove

    • recursive: boolean = false

      Whether to remove directory contents recursively

    Returns Promise<OperationResult<void>>

    OperationResult indicating success or failure

    const result = await removeDirectory('/path/to/dir', true);
    if (result.success) {
    console.log('Directory removed successfully');
    }