# tmuxp.workspace.finders.get_workspace_dir_candidates

- **Module:** tmuxp.workspace.finders
- **Package:** tmuxp
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/tmuxp/blob/153acdf6ff1268b14d3d03ed488f545a7123c8f1/src/tmuxp/workspace/finders.py#L206
- **Page:** https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-finders-get_workspace_dir_candidates/

```
tmuxp.workspace.finders.get_workspace_dir_candidates() -> list[dict[str, t.Any]]
```

Return all candidate workspace directories with existence status.

Returns a list of all directories that tmuxp checks for workspaces,
in priority order, with metadata about each.

The priority order is:
1. ``TMUXP_CONFIGDIR`` environment variable (if set)
2. ``XDG_CONFIG_HOME/tmuxp`` (if XDG_CONFIG_HOME set) OR ``~/.config/tmuxp/``
3. ``~/.tmuxp`` (legacy default)

## Returns

list[dict[str, Any]]
    List of dicts with:
    - path: str (privacy-masked via PrivatePath)
    - source: str (e.g., "$TMUXP_CONFIGDIR", "$XDG_CONFIG_HOME/tmuxp", "Legacy")
    - exists: bool
    - workspace_count: int (0 if not exists)
    - active: bool (True if this is the directory get_workspace_dir() returns)

## Example

```python
>>> candidates = get_workspace_dir_candidates()
>>> isinstance(candidates, list)
True
>>> all('path' in c and 'exists' in c for c in candidates)
True
```
